Barobo
Learning CS and Math with Robotics
Setup for Arduino and LED Module

 

Note: Full instructions on installing the necessary software and connecting the Arduino to the computer are in the "Set Up to Control Arduino Using ChDuino and RoboBlockly" document (also linked on the Tutorials page).

At the most fundamental level, a digital output is like a light switch, as shown in the circuit diagram below (consisting of a 5V battery, a switch, and RGB LED module with a connection to the red LED). If the switch is open, the light is in the off state. If the switch is closed, the light is in the on state.

However, the hardware of a simple switch is inflexible and cannot be changed without altering the physical circuit. That is why microcontrollers, like Arduino, are used for many devices, as they can perform a wide range of tasks through software changes, without changing the circuit itself. The diagram below shows such a circuit with an LED module plugged into an Arduino board:

A Barobo RGB (“red green blue”) LED module has four pins coming out of it, as shown below. They are labeled “B”, “G”, “R”, and “-“, standing for blue, green, red, and ground.

The LED module can be plugged directly in to an Arduino board. One side of the Arduino board has a row of sockets labeled 0 through 13 and GND. (Sometimes on diagrams these are labeled D0 through D13, the “D” standing for digital. In addition, even though they are sockets, they are usually referred to as pins.) Plug in the LED module so that its “-“ pin goes in the GND socket, and the R, G, and B pins naturally go in to the 13, 12, and 11 sockets, respectively, as shown below:

The Arduino board is then connected to a computer via a USB cable (blue cable shown):

Once the Arduino is connected to the computer via the USB cable, you should see a light on the board turn on, indicating it is getting power from the computer (assuming the computer is on). 

The final step in establishing a connection between the Arduino and the computer is a software connection, using either "ChDuino" software (for Windows and MacOS machines) or an "Arduino Controller" extension for Chromebooks. For details on the Windows/MacOS software, see https://roboblockly.com/u/1307.php. For details on the Chromebook software, see https://roboblockly.com/u/1322.php. The necessary software may be downloaded for free at www.barobo.com/downloads. Full instructions are also available at roboblockly.com/setup/arduino.