Well, one of my dreams was to be able to program my Arduino UNO using NodeJS. And guess what? Recently I found out about Johnny-Five which allows you to write any logic on Node!
Want to try it out? Here is what you have to do (Extra super quick semi-tutorial):
- Install NodeJS on your system.
npm initto generate it automatically.
- Create any file (
- Download and install Arduino IDE (here).
Once you followed all steps, you can get a sample code (I recommend start from Hello World) and paste it in your created
You are almost done! Now plug in your board to USB, and run
node myapp.js to upload the logic.
What? Did you hit an error like
Please check that you've properly flashed the board with the correct firmware. See: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooting?
It means we need to flush a standard
StandardFirmataPlus firmware. That's why we downloaded Arduno IDE for this scenario...
Tutorial on Instructables shows an easy way to flush a firmware straight from included examples.
Now try to run
node myapp.js again and you should be able to see your first NodeJS-powered Arduino!
Hope it worked! :)