Waveshare AlphaBot User Manual page 41

Table of Contents

Advertisement

share awesome hardware
AlphaBot User Manual
obstacle.
Ultrasonic Ranging program
Install the steering gear and Ultrasonic module to the smart robot. Connect the
jumpers TRIG, ECHO of Ultrasonic unit in D area to the pins P17 and P5 on the
Raspberry Pi.
Enter the Linux terminal, and input the following lines:
cd ~/AlphaBot/python
sudo python Ultrasonic_Ranging.py
Expectation result: The screen will show the distance measured by the Ultrasonic
unit currently.
Ultrasonic obstacle program
Install the servo and Ultrasonic module to the smart robot. Connect the jumpers
TRIG, ECHO of Ultrasonic unit in D area to the pins P17 and P5 on the Raspberry Pi.
Connect the jumpers S1 and S2C of servo in C area to the pins D9 and D10 on the
Arduino. (The tracking line function will use these pins as well, so please remove the
corresponding jumpers, avoiding interruption).
Enter the Linux terminal, and input the following lines:
cd ~/AlphaBot/python
sudo python Ultrasonic_Obstacle_Avoidance.py
Expectation result: The smart cat can perform ultrasonic obstacle avoidance. When
there is obstacle in front of the robot, the Ultrasonic module will measure the
distance from the right side and the left side of the robot to the obstacle,
41

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Waveshare AlphaBot

Table of Contents