1. Control an Arduino: Software Needed In order to control an Arduino board using RoboBlockly, additional software must be installed on the computer. For Windows and MacOS machines, the necessary "ChDuino" software comes as part of the free "Linkbot Labs" software. Information to download and install Linkbot Labs is available here. The “Ch” indicates that the software uses the Ch programming language to control the Arduino. But we can also use RoboBlockly's Arduino code blocks to control it. (For Chromebooks, an "Arduino Controller" extension is available at the same Linkbot Labs site.)
2. Launch the ChDuino Software After you have downloaded and installed the Linkbot Labs software, you can access the ChDuino software using the Launch menu in RobBlockly:
Alternatively, ChDuino should appear in the list of applications for your computer and can be launched from there. Its icon looks like this:
3. The ChDuino Interface When you launch 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.
4. Connect an Arduino with ChDuino 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. Two things may happen at this point. If you are using a new Arduino, or one that hasn't been used in awhile, the red dot will turn to green, but there will also be a message along the lines of “Check connection or update firmware": If you see this message, go to Section 5 below on how to update the firmware. The second thing that may happen when you click the "Connect" button is that the red dot simply turns 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.
5. Upload Firmware 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 on the message. A small window should open with an "Upload Firmware" button that allows you to update the firmware on the Arduino board: 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. Click the "Upload Firmware" button. You will see a progress bar that shows that it is uploading: When it is finished, a "Done Uploading" message will appear and the Arduino will be ready to go. If ChDuino does not show the Arduino as connected (with the green dot), simply click the "Connect" button again to reconnect. You can also manually update an Arduino board's firmware by going to ChDuino's Tools menu and selecting "Firmware Uploader." To do this the Arduino board should not already be connected via ChDuino, so if it is, first click the Disconnect button. (Of course, the Arduino must be physically connected to the computer with the USB cable.) When you select the "Firmware Uploader" option in the Tools menu, you will see a popup window something like this: Click "Upload Firmware" and the firmware uploading process will start. (If no Arduino board is listed, first click "Scan.")
5. Fix a Lost Connection 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.
|
Click the Run button to view and answer a question about this lesson. |
Grid Lines: | ||
Tics Lines: |
|
Width
px
|
Hash Lines: |
|
Width
px
|
Labels: |
|
Font
px
|
Trace Lines: | ||
Robot 1: |
|
Width
px
|
Robot 2: |
|
Width
px
|
Robot 3: |
|
Width
px
|
Robot 4: |
|
Width
px
|
Grid Size: S M L | Simple View: | MinView: |
![]() |
|
Coord: x-axis y-axis | Grid Lines: x-axis y-axis | |||
Grid: | 12x12 inches | 24x24 inches | 36x36 inches | |
72x72 inches | 96x96 inches | 192x192 inches | ||
1x1 inches | 2x2 inches | Fraction: | ||
xy-Range: | ||||
|
||||
|
||||
Quad: | 1 Quadrant | 4 Quadrants | 1&4 Quadrants | |
Units: | US Customary | Metric | Ruler: | |
Label: |
|
|
|
|
|
|
|
|
|
|
|
|||||||||||
|
|||||||||||