SunFounder PiCar-S
fw.turn_straight()
, making the front wheels return to the angle of moving straight forwards.
More:
back_distance
and
turn_distance
Try to modify the constants to make the car back off and turn away in a desired distance and angle as you like during
the obstacle avoidance.
1.8.2 Light Following
How It Works
The light follower module detects light sources in the surroundings, and transfers the data to the processor. The
processor analyzes the data and finds the direction of the light resource, so it will send a command to control the
movement of the front and rear wheels to approach the resource.
Procedures
Step 1 Assembly
Connect the light follower to the Sensor Connector with
M3*10 screws
and
M3 nuts
, and then assemble them to the
car with two
M3*10 screws
and two
M3 nuts
. You’re suggested to hold the nuts underneath with your fingers.
Step 2 Wiring
Connect the light follower to the Robot HATS with a 5-pin anti-reverse cable as shown below.
1.8. Arming the Car!
53
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 ...