User Manual

26
number; to make it more towards the left, you can set it smaller (it can even be a negative
number).
But DO NOT over-configure the wheels (recommended a value between -30 and 30), or the
servo may be stuck and broken.
pi@raspberrypi:~/SunFounder_PiCar/picar $ nano config
GNU nano 2.2.6 File: config
# File based database
turning_offset = 10
forward_A = 1
forward_B = 1
[ Read 9 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell
After changing the value of turning_offset, press Ctrl + O to save the changes, and press Ctrl
+ X to exit. Run the command picar servo-install to check the front wheel’s status.
pi@raspberrypi:~/SunFounder_PiCar/picar $ picar servo-install
pi@raspberrypi:~/SunFounder_PiCar/picar $
If the front wheels is still not facing the exact front, you may need to edit the file config for a
couple of times. The front wheels may need to be adjusted about 3 to 5 times usually. We can
move on to calibration of the rear wheels when the front wheels are done.
Since the wiring of the two DC motors is random, the VCC and GND of a motor may be
connected to the wheel reversely, causing the wheel to spin forward when it should do
backward as configured in the code. Thus we can use the third command which will drive the
rear wheels to simultaneously speed up and slow down alternately.
pi@raspberrypi:~ $ picar rear-wheel-test
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
Forward, speed = 0
Forward, speed = 1
Forward, speed = 2