{"action":"closed","issue":{"url":"https://api.github.com/repos/rwaldron/johnny-five/issues/1142","repository_url":"https://api.github.com/repos/rwaldron/johnny-five","labels_url":"https://api.github.com/repos/rwaldron/johnny-five/issues/1142/labels{/name}","comments_url":"https://api.github.com/repos/rwaldron/johnny-five/issues/1142/comments","events_url":"https://api.github.com/repos/rwaldron/johnny-five/issues/1142/events","html_url":"https://github.com/rwaldron/johnny-five/issues/1142","id":157623874,"number":1142,"title":"Tinkerkit touch example throwing errors","user":{"login":"ShielderJohn","id":12610427,"avatar_url":"https://avatars.githubusercontent.com/u/12610427?v=3","gravatar_id":"","url":"https://api.github.com/users/ShielderJohn","html_url":"https://github.com/ShielderJohn","followers_url":"https://api.github.com/users/ShielderJohn/followers","following_url":"https://api.github.com/users/ShielderJohn/following{/other_user}","gists_url":"https://api.github.com/users/ShielderJohn/gists{/gist_id}","starred_url":"https://api.github.com/users/ShielderJohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShielderJohn/subscriptions","organizations_url":"https://api.github.com/users/ShielderJohn/orgs","repos_url":"https://api.github.com/users/ShielderJohn/repos","events_url":"https://api.github.com/users/ShielderJohn/events{/privacy}","received_events_url":"https://api.github.com/users/ShielderJohn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-31T09:09:04Z","updated_at":"2016-06-20T15:37:40Z","closed_at":"2016-06-20T15:37:40Z","body":"**Board**: Arduino UNO\r\n**Shield**: Tinkerkit\r\n**Hardware having issue with**: touch sensor\r\n**Johhny-five version**: 0.9.51\r\n\r\nWhen trying to run the example provided for **Tinkerkit Touch** sensor:\r\n\r\n```javascript\r\nvar five = require(\"johnny-five\");\r\n\r\nnew five.Board().on(\"ready\", function() {\r\n  // Attaching to an O* pin in a deviation from\r\n  // TinkerKit tutorials which instruct to attach\r\n  // the touch to an I* pin.\r\n  //\r\n  // For the \"touch\" module, simply use a Button\r\n  // instance, like this:\r\n  var touch = new five.Button(\"O5\");\r\n\r\n  [\"down\", \"up\", \"hold\"].forEach(function(type) {\r\n    touch.on(type, function() {\r\n      console.log(type);\r\n    });\r\n  });\r\n});\r\n```\r\n\r\nThe following error is thrown:\r\n\r\n```\r\n/Users/Juan/Downloads/johnny-five-master/node_modules/firmata/lib/firmata.js:849\r\n  this.pins[pin].mode = mode;\r\n                      ^\r\n\r\nTypeError: Cannot set property 'mode' of undefined\r\n    at Board.pinMode (/Users/Juan/Downloads/johnny-five-master/node_modules/firmata/lib/firmata.js:849:23)\r\n    at Button.Controllers.DEFAULT.initialize.value (/Users/Juan/Downloads/johnny-five-master/lib/button.js:31:17)\r\n    at new Button (/Users/Juan/Downloads/johnny-five-master/lib/button.js:257:10)\r\n    at Board.<anonymous> (/Users/Juan/Downloads/johnny-five-master/eg/tinkerkit-touch.js:10:15)\r\n    at emitNone (events.js:72:20)\r\n    at Board.emit (events.js:166:7)\r\n    at doNTCallback0 (node.js:417:9)\r\n    at process._tickDomainCallback (node.js:387:13)\r\n```"}}
{"actor":{"display_login":"rwaldron"}}