Tuesday, April 9, 2013

Little something cool here i thought i'd share:


$('light').fadeIn();

The Arduino microcontroller platform is a grade A example for an "out of the box" JavaScript use case. For those of you, who are not familiar with the Arduino platform, here's a super famous quote from its website:

"Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."

The Arduino itself only supports code written in C, which is still no big deal. With a few lines of C (besides that others have done this work for you), the Arduino can receive commands through its USB port via the serial port protocol.
But how can you access the serial port via JavaScript? Clearly not from the browser.
Node.js to the rescue!
Due to the efforts of community advocate Chris Williams, we have a Node serial port library, where we can send data over the old SP protocol. This was the initial breakthrough, based on the library other people came up with a more abstract approach for Arduino's capabilities. For instance the node-arduino and duino libraries.
The hottest and coolest library around the block for JS driven Arduino programming by now isjonny-five. Check out Bocoup's blog for some hot shit they've done with the Arduino platform and plenty of plug-ins. Also the JSConf video from Nicolai Onken and Jörn Zaefferer might give you a spin of what's possible today with little code.

1 comment:

  1. I would recommend changing the color of the hyperlinks.

    http://poundingheadprogramming.blogspot.com/

    ReplyDelete