EasyManua.ls Logo

ADEEPT PiCar-Pro - Ultrasonic Scanning Code

ADEEPT PiCar-Pro
178 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
163
3. Place the car at the location to be detected.
4. Click the "SCAN" pattern, PiCarPro will start to rotate and detect the surrounding
environment. After the detection is completed, there will be red dots in the pattern
where there are obstacles.
12.4.2 Main code program
For the complete code, please refer to the file
functions.py
.
Import dependencies and initialize.
1. import time
2. import RPi.GPIO as GPIO
3. import Adafruit_PCA9685
4.
5. # Ultrasonic module pins
6. UPin1 = 11
7. Upin2 = 8
8.

Related product manuals