Learning CS and Math with Robotics
Software Setup for Arduino (Windows/Mac)

In order to control an Arduino board using RoboBlockly, additional software must be installed on the computer. For Windows and MacOS machines, Barobo provides the necessary "ChDuino" software as part of its free "Linkbot Labs" software download, available at (For Chromebooks, an "Arduino Controller" extension is available at the same site.)

After you have downloaded and installed the software, ChDuino should appear in your list of applications. (The “Ch” indicates that the software uses the C programming language, via the Ch interpreter, to program the Arduino.) Its icon looks like this:

When you open ChDuino, you should see a graphical user interface similar to the one shown below:

It gives a visual representation of the various pins on the Arduino board, and allows us direct control of the input and output pins on the board. You can view the analog voltage values read by the A0-A5 ports on the left side, can view digital input values, and can control the digital output values.

The next step is to connect the Arduino to the computer via a USB cable, if not already done. (See the relevant RoboBlockly lesson for the setup instructions.) Once the physical connection is made, and the ChDuino software is open, make sure that the “USB” checkbox at the top left of the ChDuino interface is checked (and Bluetooth unchecked). Then click the “Scan” button at the top left, and it will scan for a connected Arduino board. Yours should appear in the message area in the middle left, as shown in below, with a red dot next to it (it may appear without you having to click "Scan"):

The red dot indicates that the Arduino is physically connected but not yet connected via the software. The COM port where the Arduino is connected may also be listed. (It’s possible to have multiple Arduinos connected to the same computer.)

To complete the connection click the “Connect” button at the top left. The red dot should turn to green:

In addition, fluctuating numbers should appear in the Analog pin section of the ChDuino interface, and you should see a blinking light on the Arduino. This all indicates that the Arduino is properly connected and ready for use. 

Sometimes the connection will be lost, as indicated by the absence of the blinking lights on the Arduino, the static nature of the analog pin values in ChDuino, and/or the green dot turning to red. If that’s the case, simply click the “Connect” button to reconnect.

If, when you click the “Connect” button, the red dot turns to green but there’s also a message along the lines of “Check connection or update firmware,” click the message. A small window should open with a button that allows you to update the firmware on the Arduino board:

It usually only takes a few seconds, and then you’re ready to go. (Firmware is the computer code stored on the Arduino that runs the board. When new features are added, or software bugs fixed, a new version of the firmware must be uploaded and stored in the Arduino board.)