Waveshare AlphaBot 2 User Manual page 14

Table of Contents

Advertisement

share awesome hardware
AlphaBot 2 User Manual
Ultrasonic infrared obstacle avoidance
Compile and download the program Ultrasonic-Infrared-Obstacle-Avoidance. In
this example, the robot goes straight when there is no obstacle, and turns right
when obstacle is detected.
Tracker sensor testing
Import the library TRSensors to the file libraries under the installation directory of
Arduino IDE. Then, click File -> Example -> TRSensors ->TRSensorExample to open
the project. Compile and download the program to the development board
Arduino.
The tracker sensor can detect the black line in the background color of white. You
can choose a black adhesive tape with 15cm width, and paste it to a white KT board
to create the smart robot tracking line scenario. The dark background color will
reduce the capability of the smart robot on the tracking line.
Open the serial monitor, and set the baud rate to 115200. When the monitor
displays the characters "TRSensor example", you should hold the robot in the
middle of the black line and close to the ground, then swing the robot from side to
side. Then, the smart robot goes into the calibration mode, identifying the Max.
and the Min. threshed of each sensor. Calibration can have a direct influence to the
tracking line capability of the robot.
After the calibration, the monitor shows the Max. and the Min. threshed of each
14

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Waveshare AlphaBot 2

Table of Contents