Johnny-Five does a fantastic job of abstracting away many of the complexities of interactive with Arduinos, sensors, and actuators. But its use still depends on things like installing a particular firmware (Firmata) on the Arduino and setting up a proper Node.js environment for running user’s applications. These requirements are often a stumbling block to those that are just learning electronics and/or programming. So how do we simplify the process further and help new users get to “awesome” faster? Enter Chromebots.
Let’s see just how easy it is to get started.
1) Install Chromebots
First, you need to install the “Johnny-Five Chrome” application from the Chrome web store. Once installed, you can launch the Chromebots application via the “Apps” icon in the bookmarks bar of Chrome or the Chrome App Launcher that’s installed to your taskbar (Windows) or Dock (Mac). You’ll be presented with a window like this:
2) Connect your Arduino
Plug in your Arduino UNO (or compatible board) via USB and click the blue refresh button next to the Port selection box. The Chromebots app will automatically detect which serial port is assigned to your Arduino. Depending on what operating system you are using, it will be something like “COM3” or “/dev/tty.usbmodem1411”. If you aren’t sure which port is the correct one to choose, simply unplug the Arduino, refresh the list, then plug it back in and see which one shows up new.
3) Install Firmata
If you haven’t already installed Firmata on your Arduino (or just aren’t sure), click the “Install Firmata” button. The TX/RX lights will flash briefly on your Arduino, and then the process is complete.
4) Add an LED to pin 13
For our first sample program, we’ll just blink an LED. The easiest way to do this is to insert an LED directly on the Arduino. The longer lead on the LED is positive and connects to pin 13. The shorter negative lead is inserted into ground (GDN) next to pin 13.
5) Run your Johnny-Five program
Now you’re ready to run your first program! By default, the Chromebots app starts out with a sample Johnny-Five program that waits for a connection to the Arduino, defines an LED on pin 13, and calls the blink() function. Click the “Run” button and the LED you plugged into pin 13 will start blinking rapidly.
And that’s it. You’re now ready to explore the power of Johnny-Five to build your own Nodebot! The Chromebots app makes several variables available for your use. The “five” variable is the standard Johnny-Five library. The “io” variable represents the Firmata instance for the board. jQuery (“$”) and lodash (“_”) are also available as convenience libraries. So what next? I recommend trying a few of the Johnny-Five example programs to get you started with understanding how the framework is used.
Now build something awesome and then share it with the Nodebots community! I can’t wait to see what you create.
About the author
David Resseguie is a member of the Computational Sciences and Engineering Division at Oak Ridge National Laboratory and lead developer for Sensorpedia. His interests include human computer interaction, Internet of Things, robotics, data visualization, and STEAM education. His current research focus is on applying social computing principles to the design of information sharing systems. He can be found on Twitter @Resseguie.