Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgautier/1068567 to your computer and use it in GitHub Desktop.
Save jgautier/1068567 to your computer and use it in GitHub Desktop.
My short node-js-firmata attempt
// On Arduino Uno 2.2
// Using Examples > Firmata > StandardFirmata_2_2_forUNO_0_3
var firmata = require("./firmata/lib/firmata");
var board = new firmata.Board("/dev/tty.usbmodem621",function(){
//code for board needs to go here
console.log(board); // logs board object, board.pins is empty
board.digitalWrite(2, 1); // generates error can't write value to undefined
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment