{"action":"created","issue":{"url":"https://api.github.com/repos/sandeepmistry/node-chip-io/issues/15","repository_url":"https://api.github.com/repos/sandeepmistry/node-chip-io","labels_url":"https://api.github.com/repos/sandeepmistry/node-chip-io/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/sandeepmistry/node-chip-io/issues/15/comments","events_url":"https://api.github.com/repos/sandeepmistry/node-chip-io/issues/15/events","html_url":"https://github.com/sandeepmistry/node-chip-io/issues/15","id":171066092,"number":15,"title":"Getting an LCD 16x2 driver working with I2C","user":{"login":"nkolban","id":3421732,"avatar_url":"https://avatars.githubusercontent.com/u/3421732?v=3","gravatar_id":"","url":"https://api.github.com/users/nkolban","html_url":"https://github.com/nkolban","followers_url":"https://api.github.com/users/nkolban/followers","following_url":"https://api.github.com/users/nkolban/following{/other_user}","gists_url":"https://api.github.com/users/nkolban/gists{/gist_id}","starred_url":"https://api.github.com/users/nkolban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkolban/subscriptions","organizations_url":"https://api.github.com/users/nkolban/orgs","repos_url":"https://api.github.com/users/nkolban/repos","events_url":"https://api.github.com/users/nkolban/events{/privacy}","received_events_url":"https://api.github.com/users/nkolban/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-14T16:17:50Z","updated_at":"2016-09-18T01:46:06Z","closed_at":null,"body":"I'm writing a book on CHIP and want to include sections on using Johnny-Five to drive I/O.  I am testing with an LCD 16x2 display with an I2C adapter.  The Node.js script I am running is:\r\n\r\n```\r\n\"use strict\";\r\n\r\nvar five = require('johnny-five');\r\nvar chipio = require('chip-io');\r\n \r\nvar board = new five.Board({\r\n  io: new chipio()\r\n});\r\n \r\nboard.on('ready', function() {\r\n\tlet lcd = new five.LCD({controller: \"PCF8574A\", address: 0x3f, bus: 2});\r\n\tlcd.cursor(0,0);\r\n\tlcd.print(\"1234567890\");\r\n\tconsole.log(\"We should now see text!\");\r\n});\r\n```\r\nMy node version is 4.4.7.\r\n\r\nWhen I run the script, 1 time in 10 (approx) it shows the desired output,  otherwise it is garbage text ... sometimes the garbage changes from run to run.  I have validated that my LCD is working properly.  Based on the fact that the output is non-deterministic, my thinking is that I am facing a timing issue of some description.   Have you heard of anything similar?\r\n\r\nIf there are additional diagnostics I can provide, don't hesitate to post back.  If I can assist live with real-time tests, screen shares or anything else, I can be reached on skype at \"neil.kolban\".\r\n"},"comment":{"url":"https://api.github.com/repos/sandeepmistry/node-chip-io/issues/comments/247818832","html_url":"https://github.com/sandeepmistry/node-chip-io/issues/15#issuecomment-247818832","issue_url":"https://api.github.com/repos/sandeepmistry/node-chip-io/issues/15","id":247818832,"user":{"login":"sumarouno","id":8051577,"avatar_url":"https://avatars.githubusercontent.com/u/8051577?v=3","gravatar_id":"","url":"https://api.github.com/users/sumarouno","html_url":"https://github.com/sumarouno","followers_url":"https://api.github.com/users/sumarouno/followers","following_url":"https://api.github.com/users/sumarouno/following{/other_user}","gists_url":"https://api.github.com/users/sumarouno/gists{/gist_id}","starred_url":"https://api.github.com/users/sumarouno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumarouno/subscriptions","organizations_url":"https://api.github.com/users/sumarouno/orgs","repos_url":"https://api.github.com/users/sumarouno/repos","events_url":"https://api.github.com/users/sumarouno/events{/privacy}","received_events_url":"https://api.github.com/users/sumarouno/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T01:46:06Z","updated_at":"2016-09-18T01:46:06Z","body":"@sandeepmistry , I upgraded to node-chip-io v2.0.1 as your request. I can confirm that no more problem to my lcd 1i2 backpack. This code is work like a charm:\r\n```\r\n\"use strict\";\r\n\r\nvar five = require('johnny-five');\r\nvar chipio = require('chip-io');\r\n\r\nvar board = new five.Board({\r\n  io: new chipio()\r\n});\r\n\r\nboard.on('ready', function() {\r\n    let lcd = new five.LCD({controller: \"PCF8574T\", address: 0x27, bus: 2});\r\n    lcd.cursor(0,0);\r\n    lcd.print(\"1234567890\");\r\n    console.log(\"We should now see text!\");\r\n});\r\n\r\n```\r\nThanks for your great work"}}
{"actor":{"display_login":"sumarouno"}}