- Assemble Pi Racer
- Setup Raspberry Pi
- Create car application
- Control car using by Web Controller
- Control car using by Gamepad
- Display OLED panel
- Tips
- Errors
- Assemble the Pi-Racer following to the pdf
Important Point
- When connect motor & servo, attention to the connection
- Connect right direction the Camera
- Download Imager in link
- Follow OS specific guide
- Operating System -> Downloaded image
- SD Card -> Your own SD card for Raspberry Pi
- Check Enable SSH
- Check Set username and password
- Username is server's name
- Password is server's password
- Remember this. It needs when connect Raspberry Pi server & PC
-
Check Configure wireless LAN
- Enter the Wi-Fi or LAN information you are using on the PC you are connecting to
-
Setting done. Write the Image
- Write finish and Move to /boot directory
- Enter the command
touch ssh
ortouch /Volume/boot/ssh
- Second one only work in Linux or Mac
- Connect monitor with Raspberry Pi
- Command
ifconfig
& check IP_ADDRESS - Command
ssh -Y {SERVER_NAME}@{IP_ADDRESS}
nmap -sn {IP_ADDRESS}.0/24
- ex) nmap -sn 192.168.2.0/24 -> Change last number to 0 or *
- Find Raspberry Pi's IP_ADDRESS
- Command
ssh -Y {SERVER_NAME}@{IP_ADDRESS}
If there are many devices connected to the router, check the Raspberry Pie by turning it off and on
- Raspberry Pie IP is caught similar to a PC
But I don't recommend it. It's not like a programmer.
- Create a set of files to control your Donkey with this command
donkey createcar --path ~/mycar
- You can also change your path something else instead of "mycar"
-
It's only for Raspberry Pi
-
sudo apt-get install -y i2c-tools
-> install i2c-tools -
sudo i2cdetect -y 1
-> check your car- If you can't see 40
- On Pi, ensure I2C is enable in menu of
sudo raspi-config
- It suggest reboot
- Check your hardwear
- Maybe your cable or Something wrong
- On Pi, ensure I2C is enable in menu of
- If you can't see 40
- In terminal, follow commands
pi@raspberrypi:~$ source ~/env/bin/activate (env) pi@raspberrypi:~$ cd mycar/ (env) pi@raspberrypi:~/mycar$ python manage.py drive
- Open Chrome in host pc. Go to http://{RASPBERRY_PI_IP_ADDRESS}:8887
- Reference Link
- Connect the USB adapter of Gamepad to Raspberry Pi
- In terminal, follow commands
pi@raspberrypi:~$ source ~/env/bin/activate (env) pi@raspberrypi:~$ cd mycar/ (env) pi@raspberrypi:~/mycar$ python manage.py drive --js
- Use
--js
option- Run donkeycar with this command
python manage.py drive --js
- Run donkeycar with this command
- Modify myconfig.py file
- Find
USE_JOYSTICK_AS_DEFAULT
- Modify False to True
USE_JOYSTICK_AS_DEFAULT = True
- Find
- It should be occur this message
- follow this code to reset ssh-key
ssh-keygen -R {IP_ADDRESS}
- IP_ADDRESS => Raspberry Pi's IP address
- Gamepad work different way
- 7 & 8 is changed
- Left and Right -> Left is forward and Right is backward
- Front and Rear -> Front is right and Read is Left