SunFounder PiCar-S
Step 3 Test
First, test the ultrasonic obstacle avoidance module before applying.
cd
~/
SunFounder_PiCar
-
S
/
example
/
python3 test_ultrasonic_module
.
py
You may find that the distance measurement may be not that accurate. It doesn’t matter. This 25kHz ultrasonic module
is not a commonly used one, but one has a
horizontal detecting range of about 30~40 degrees
. Thus the distance
measured may be not so accurate, but that small range provides convenience for obstacle avoidance. Besides, since the
Raspberry Pi is not a real-time operating system, the inaccurate time calculation will affect the accuracy of distance
measurement too. However, this ultrasonic module is precise enough for obstacle avoidance.
Step 4. Get on the road!
Now we have a general idea of the ultrasonic module’s effect after the test above. Let’s run the code of the ultrasonic
48
Chapter 1. About the PiCar-S
Summary of Contents for PiCar-S
Page 1: ...SunFounder PiCar S www sunfounder com Nov 10 2021 ...
Page 2: ......
Page 4: ...ii ...
Page 8: ...SunFounder PiCar S 4 Chapter 1 About the PiCar S ...
Page 9: ...SunFounder PiCar S 1 1 3 Mechanical Fasteners 1 1 Components List 5 ...
Page 10: ...SunFounder PiCar S 1 1 4 Wires 6 Chapter 1 About the PiCar S ...
Page 11: ...SunFounder PiCar S 1 1 5 PCB 1 1 Components List 7 ...
Page 12: ...SunFounder PiCar S 1 1 6 Other Components 8 Chapter 1 About the PiCar S ...
Page 22: ...SunFounder PiCar S 18 Chapter 1 About the PiCar S ...
Page 26: ...SunFounder PiCar S 22 Chapter 1 About the PiCar S ...
Page 27: ...SunFounder PiCar S 1 4 Circuits Building 1 4 1 Connect the Power 1 4 Circuits Building 23 ...
Page 28: ...SunFounder PiCar S 1 4 2 Connect the Modules 24 Chapter 1 About the PiCar S ...
Page 29: ...SunFounder PiCar S 1 4 3 Connect the Servo 1 4 Circuits Building 25 ...
Page 69: ...SunFounder PiCar S Subflow of Line Following Function 1 8 Arming the Car 65 ...
Page 74: ...SunFounder PiCar S 70 Chapter 1 About the PiCar S ...