FAQ: Arduino and Robot Sensors

How do I control an Arduino board using RoboBlockly?


Full instructions, with an example using an LED module connected to the Arduino board, are available here. The following outlines the essential details.

(1) In combination with RoboBlockly, you need "ChDuino" software for Windows or MacOSX to control an Arduino board. ChDuino is available as a free download from Barobo as part of its “Linkbot Labs” software. To download the latest version of Linkbot Labs, go to www.barobo.com/downloads and follow the instructions for the type of computer you’re using (Windows or MacOSX). (ChDuino and Linkbot Labs are also included in the full-featured C-STEM Studio integrated software platform, version 6.0 or higher. More info here and download available here.)

(2) Launch the ChDuino application directly from your Application menu or from within C-STEM Studio (listed in the Software section on the left side).

(3) Connect ChDuino to your Arduino board. (Detailed instructions are available here or in Chapter 2 of Learning Physical Computing with Arduino for the Absolute Beginner.)

(4) Launch RoboBlockly at www.roboblockly.com, using either a regular Chrome browser or by clicking the RoboBlockly option in the Software section on the left side of C-STEM Studio.

(5) In RoboBlockly click on the Arduino option to display the Arduino programming blocks (as shown in Figure 1 below) and then drag code blocks such as pinMode() and digitalWrite() to the Workspace.

(6) Click “Run” or “Step” to execute the code blocks on the Arduino board that is connected via ChDuino.

(7) If the code does not seem to be working with the Arduino board when you click “Run,” see the instructions and troubleshooting advice here. You can also get insight into the potential problem by clicking “Save Ch” in RoboBlockly to save the underlying Ch code to a file with the default name roboblockly.ch (stored in Downloads or in the C-STEM Studio->My Workspace->RoboBlockly folder). Then open that file in ChIDE (the Ch Integrated Development Environment, available via C-STEM Studio) and run it. The error messages displayed may help you debug the problem.

Figure 1: RoboBlockly user interface with the Arduino code blocks displayed.




I have some older versions of the Linkbot (or an even older Mobot). Can they work with Arduino boards for sensor-based robotics?


Mobots and older Linkbots cannot work with the Linkbot Arduino board. To check whether you have an older Linkbot, connect it to an Arduino board with a Linkbot-Arduino cable and then turn on the Linkbot. If the Arduino board powers on as well (as indicated by the onboard LED light), then it is an older Linkbot that will not work with the Arduino board.




Where can I learn more about using Arduino with RoboBlockly and Linkbots?


The first seven sections of the textbook Learning Physical Computing with Arduino for the Absolute Beginner are available as a free pdf file here.




I'm using an Arduino wired to a Linkbot for mobile operations and activities, and I'm having trouble getting the Linkbot to connect to RoboBlockly via the Linkbot Labs software. For example, the Linkbot's beep works but not the wheels. What should I do?


For some (though not all) Arduino boards, when you have the Arduino wired to the Linkbot (using the Linkbot-Arduino cable), and devices wired to the Arduino (e.g., LEDs, sensors, etc.), you need to make sure the board has power BEFORE you turn on the Linkbot and connect it to the computer using Linkbot Labs. To do so, simply make sure the battery is plugged in to the Arduino first, and then turn on the Linkbot and connect it as usual using Linkbot Labs. (The Linkbot Uno Pack has the necessary equipment to connect an Arduino board to a Linkbot.)





0
  • Facebook Social Icon
  • Google Places Social Icon
  • Instagram Social Icon
  • Twitter Social Icon
  • YouTube Social  Icon
  • Facebook Social Icon
  • Google Places Social Icon
  • Instagram Social Icon
  • Twitter Social Icon
  • YouTube Social  Icon

© 2020 Barobo, Inc.