8.4.1Run the code
1. Remotely log in to the Raspberry Pi terminal.
2. Enter the command and press Enter to enter the folder where the program is
located:
cd adeept_picarpro/server/
3. View the contents of the current directory file:
ls
4. Enter the command and press Enter to run the program:
sudo python3 ultra.py
5. After successfully running the program, the command window will display the
distance data of the obstacle detected by the ultrasonic sensor. When you use an
object to approach it directly in front of the ultrasonic sensor, the detected distance
data will change.
6. When you want to terminate the running program, you can press the shortcut key
"Ctrl + C" on the keyboard.
8.4.2 The main code program of this lesson
89
Need help?
Do you have a question about the PiCar-Pro and is the answer not in the manual?