Waveshare AlphaBot User Manual page 40

Table of Contents

Advertisement

share awesome hardware
AlphaBot User Manual
Infrared remote control program
Connect the jumper of motor in A area to the Raspberry Pi, and the jumper of the
Infrared receiver IR in G area to the pin P18.
Enter the Linux terminal, and input the following lines:
cd ~/AlphaBot/python
sudo python Infrared_Remote_Control.py
Expectation result: When pressed the key on the Infrared remote controller, you can
control the smart robot. The key 2 is for go forwards, 8 for go backwards, 4 for turn
left, 6 for turn right, 5 for stop, - for speed down and + for speed up. (Notes: The
key encoding may change with different Infrared remote controller. You can modify
the program as required. )
Infrared tracking line program
Connect the jumpers of the motor in A area to the Raspberry Pi, and the pins CLK,
ADDR, DOUT and CS of tracking line function in F area to the pins P25, P24, P23 and
P5.
Enter the Linux terminal, and input the following lines:
cd ~/AlphaBot/python
sudo python Infrared_Line_Tracking.py
Connect the jumpers TRIG, ECHO of Ultrasonic unit in D area to the pins D11 and
Expectation result: Turn on the power adapter, 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, respectively. Then, it will move to the side that far away from the
40

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Waveshare AlphaBot

Table of Contents