RoboBlocky
Sign In
Learning Math/CS/Engineering Design with Robotics
Use Ultrasonic Sensor to Measure Distance
  • Lessons for new concepts
  • Activities for homework

Learn how to get started programming the Linkbot-Arduino combination, by using RoboBlocky's built-in, drag-and-drop LArduino commands to control an ultrasonic sensor and implement a Linkbot collision avoidance program! 

(See below for hardware and software needed, plus instructions on connecting the ultrasonic sensor to the Arduino, which in turn is connected to the Linkbot.)

Hardware needed:

Barobo Linkbot Advanced Kit:

Barobo Robot Sensor Pack:

 

Software needed:

RoboBlocky at www.roboblocky.com (free)

To enable control of hardware Linkbots via a computer, download Linkbot Labs for free (or C-STEM Studio including Linkbot Labs)

 

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).

   

 

Connecting the Linkbot to the computer (and RoboBlocky):

Instructions on connecting a Linkbot to a computer via RoboBlocky can be found here.