User Manual
38
Getting on the Road!
Make sure all the procedures have been finished, and check there is no problem about the
mechanical assembly and software installation. Then you can start the car now. Install two
batteries, and turn on the power switch.
Tips: If you keep the Raspberry Pi power on from the beginning, now you do not need to turn
it off. DO NOT unplug the Micro USB cable until you've installed the batteries and switched it
on. So you do not need to turn it on or off again. If later the batteries run out, or half does,
and you want to do the debugging, you can also just plug in the USB cable for power without
shutting down. The Robot HATS integrates a backflow prevention diode to protect it from
being damaged by the USB power, so does the Raspberry Pi. So take it easy for using the two
power sources at the same time!
Here is what we're going to do:
Use the Raspberry Pi as the server. Run a web server with an API for controlling the car and
transmitting images captured by the camera.
Then take a PC, cell phone, or tablet as the client, and acquire the images from the camera
and control the car by calling the API of the web server.
1. Run the Server(Operation on Raspberry Pi)
Remotely log into the Raspberry Pi. You can find a startup script start under the
remote_control directory. Run the script to start the web service.
cd ~/SunFounder_PiCar-V/remote_control
sudo ./start
The script will enable the service and the corresponding data will appear. The hardware is
initialized at the same time, so the servos connected to the front wheels and the pan-and-
tilt will turn, indicating the hardware initialization is done.
pi@raspberrypi:~ $ cd ~/SunFounder_PiCar-V/remote_control/
pi@raspberrypi:~/SunFounder_PiCar-V/remote_control $ sudo ./start
Server running
Performing system checks...
DEBUG "front_wheels.py": Set debug off
DEBUG "front_wheels.py": Set wheel debug off
DEBUG "Servo.py": Set debug off
DEBUG "back_wheels.py": Set debug off
DEBUG "TB6612.py": Set debug off
DEBUG "TB6612.py": Set debug off
DEBUG "PCA9685.py": Set debug off
DEBUG "camera.py": Set debug off