
Posting at the Safari Books Online Blog, Derick Bailey has created an Arduino project that bows before Atwood’s Law (“Any application that can be written in JavaScript, will eventually be written in JavaScript.”):
It should be no surprise, then, that JavaScript can also be used to control off-the-shelf hardware, circuits and other electronics like the Arduino platform. Through the use of frameworks like Rick Waldronโs Johnny-Five for NodeJS, and the โStandardFirmataโ software package for Arduino, you can write JavaScript on your computer and use it to control and manipulate nearly any aspect of an Arduino-based hardware setup.
But before you take over the world with your JavaScript powered robots, youโll need to get a few of the basics out of the way. Youโll need to know how to get an Arduino to communicate with your JavaScript program. Youโll need to know how to build a circuit that works properly. And youโll need to know how to manipulate that circuit, through the use of Arduino, with your JavaScript code. And before you do any of that, youโll need a few hardware parts to work with.
Check out the article for all the code, Fritzing diagrams, and list of electronic parts you need to control a USB-tethered Arduino from a Node app running on your computer: JavaScript Powered Arduino with Johnny-Five. (You can also find our MAKE books up on Safari Books Online; they’ve got a link at the end of Derick’s post to one of my favorites: Make a Mind-Controlled Arduino Robot.
ADVERTISEMENT