Learn how to use RoboBlocky's LArduino to measure distances and avoid collisions using an ultrasonic sensor. Linkbots can be adapted with an Arduino board that allows the Linkbot to work with sensors, lights, and much more.
Hardware needed:
Software needed:
RoboBlocky at www.roboblocky.com (free)
Connecting the ultrasonic sensor:
As shown in the first image below, the VCC pin of the sensor is connected to the 5V pin in the Power section of the Arduino, and the Gnd pin of the sensor is connected to one of the GND pins in the same section. The sensor's Trig pin is connected to digital pin 9, and the Echo pin is connected to digital pin 8. The image also shows how the green, red, and black wires from the white cable connector plug into the A5, A4, and GND pins, respectively. The other end of the white cable plugs into the top of the Linkbot, as shown in the second image below, with a complete view of the Linkbot-Arduino-Sensor connections (plus an LED module attached using wires instead of the direct plug-in method used in the "Blink RGB LED with LArduino" activities).