-
Download and start Raspberry Pi Imager from here.
-
Choose OS: "SCL or GUI (Raspbian 64/32 bits)"
-
Select USB Driver.
-
Go to Settings (Advanced Option).
-
Press the Save Button.
-
Press the Write Button.
-
Insert the USB Driver into Raspberry Pi to start installing Ubuntu.
Follow the PiRacer Assembly Manual.
Follow the PiRacer-py guide.
-
Run the following commands to add the Raspberry Pi repository and update the system:
sudo -s echo "deb http://archive.raspberrypi.org/debian/ buster main" >> /etc/apt/sources.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7FA3303E apt update exit
-
Install the required libraries and tools:
sudo apt update sudo apt install \ gcc \ v4l-utils \ i2c-tools \ raspi-config \ python3-dev \ python3-setuptools \ python3-venv \ libopencv-dev \ piracer-py
-
If you choose Ubuntu, mount the boot partition:
mount /dev/mmcblk0p1 /boot/
-
Enable I2C and Camera using the 'raspi-config' tool:
- i2c: Interface Options > I2C
- Camera: Interface Options > Camera
Afterwards, reboot the Raspberry Pi:
sudo reboot
-
Install the piracer-py package:
cd ~ mkdir piracer_test/ cd piracer_test/ python3 -m venv venv source venv/bin/activate pip install piracer-py
After following these steps, you can try the example code provided in the link.
- basic_example.py: Operating throttle and steering.
- rc_example.py: Check the Controller (Check Connect, Throttle, Steering works correctly)

- camera_grab_example.py: Check the Camera.
-
basic_example.py
- Test pi-racer operating well
- Moving Forward - Backward - left -right - sleep
-
camera_grab_example.py
- Test pi-racer camera working well
- After working this file, if you get some image and it operates correctly
-
rc_example.py
- Control the pi-racer using controller
-
shutdown.py
- Stop movement of pi-racer