kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Readme not correct #6

Closed Duvel closed 11 years ago

Duvel commented 11 years ago

Hi,

I was just testing the new version and I now decided to test your readme as well :)

If I use this:

var wire = new i2c(4, device:'/dev/i2c-1');

I get this error:

var wire = new i2c(4, device:'/dev/i2c-1'); // point to your i2c device, debug ^ SyntaxError: Unexpected token : at Module._compile (module.js:437:25) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.runMain (module.js:492:10) at process.startup.processNextTick.process._tickCallback (node.js:244:9)

With braces it works as I would expect:

var wire = new i2c(4, {device:'/dev/i2c-1'});

Grtz,

Remco

kelly commented 11 years ago

Whoops, I write too much coffeescript :) Will get that fixed soon. Thanks!