Data Sheet

TROUBLESHOOTING WARNING: HVAC systems in offices and schools have
been known to interfere with the performance of the ultrasonic distance sensor. If
you are experiencing sporadic behavior from your circuit, check your surroundings.
If there are numerous air ducts in the room you are using, try moving to a different
room that does not have ducts. The airflow from these ducts can interfere with the
waves sent from the sensor, creating noise and resulting in bad readings.
62 : circuit 3b
PROGRAM OVERVIEW
Check what distance the sensor is reading.
: If the distance is less than 10 inches, make the RGB LED red.
: If the distance is between 10 and 20 inches, make the RGB LED yellow.
: If the distance value is not equal to the fist two conditions, make the RGB LED green.
WHAT YOU
SHOULD SEE
Move your hand or a large, flat
object closer and farther away
from the distance sensor. As the
object approaches, the light will
change from green to yellow to
red. Open the Arduino Serial
Monitor to see the distance
being read from the sensor.
Open the Arduino IDE
Connect the RedBoard to a USB port on your computer.
Open the Sketch:
File > Examples > SIK_Guide_Code-V_4 > CIRCUIT_B-DISTANCE SENSOR
Select UPLOAD to program the sketch on the RedBoard.
SIK v4 Book Oct 13.indb 62 10/18/17 10:01 AM