Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Arduino with Javascript

Mot
February 06, 2012

Arduino with Javascript

Turning a light on and off using arduino and javascript.

Mot

February 06, 2012
Tweet

More Decks by Mot

Other Decks in Technology

Transcript

  1. Arduino with Javascript Turning a light on and off using

    arduino and javascript. Monday, February 6, 2012
  2. Requirements • An Arduino board • Arduino software installed to

    your machine • node.js and npm installed to your machine Monday, February 6, 2012
  3. Upload du.ino • https://gist.github.com/1756810 • Upload the above du.ino sketch

    to your Arduino board. It is written in C++ and will live on the board. Monday, February 6, 2012
  4. duino_example.js • Create a file named duino_example.js somewhere on your

    machine. • Paste the following gist: https:// gist.github.com/1756829 • npm install serialport • node duino_example.js Monday, February 6, 2012
  5. duino_express.js • Create a file named duino_express.js somewhere on your

    machine. • Paste the following gist: https:// gist.github.com/1756868 • npm install express • node duino_express.js • Visit http://localhost:3000 Monday, February 6, 2012
  6. Next Steps • Visit https://github.com/scottmotte/ arduino_with_javascript • Visit https://github.com/ecto/duino to

    learn more. • Visit https://github.com/voodootikigod/node- serialport • If you have trouble on your Arduino try adjusting the baud_rate defined in du.ino. I changed mine to 9600 in du.ino. Monday, February 6, 2012