STK-node

Pages
Contributors: D___Run___
Favorited Favorite 0

Trying It Out With the Chrome App

To make things easy, there is a Johnny-Five Chrome app that enables you to program your boards using Johnny-Five through a web browser. This is great for people who just want to try it out before installing Node.js on their machine, or schools who are using Chromebooks and want their students to get started in JavaScript-based robotics.

To get started with using the app, sign in to your Google account and navigate to the app store. Search for "johnny-five" or use the button below.

You should be greeted by an app info page that looks like this:

alt text

Go ahead and click "Install App." The app will install, and then you can launch it. Upon launching you will see the text editor with some code pre-populated.

alt text

Programming in the Cloud

Go ahead and plug your board into your computer using the USB cable. Give your computer a few minutes to detect the board and then from the Port menu select either a "COMXXX" port if you are in a windows machine or a "dev/tty/serialXXXX" if you are on a mac.

alt text

With your port selected, you can now install Firmata. Firmata is the firmware that resides on the Arduino and allows Johnny-Five to communicate back and forth with your board. Click "Install Firmata". The app will install Firmata (Patience, this may take a while). Once complete you can now test the board to make sure that everything is up and running.

Go ahead and click the "Run" button to run the code that is in the editor window. This will cause the console at the bottom to return some information and the LED on pin 13 to blink on and off pretty quickly.

alt text

With that you are ready to go forth and explore the world of JavaScript robotics!

The Catch!

The app is designed with an introduction to JavaScript robotics in mind, in hopes that the user would later install a full development environment on their computer to build more complex projects. The limitation to using the Johnny-Five Chrome App is that you cannot use any other Node.js Modules with it. Which means the Exploring Node.js sections of each Experiment in this guide will only work for those who have Node.js installed on their computers locally and are working in a text editor.