Documentation & Instructions
Setup
Follow these steps to set up and configure your PiCar-X robot for development and testing.
Initial Connection
- Connect an HDMI cable from the robot to a monitor.
- Connect a mouse and keyboard to the Raspberry Pi USB ports.
- Insert charged batteries into the bottom of the robot.
- Power on the robot using the switch on the Arduino board.
- When prompted for a password, enter
picarx1 (all lowercase, no quotes).
Virtual/Remote Connection (RealVNC)
To control the robot remotely from your personal computer, use RealVNC for a wireless connection:
- Download and install RealVNC Viewer on your personal computer.
- Connect both your personal computer and the Raspberry Pi to the same network (not the college network).
- On the Raspberry Pi terminal, type
hostname -I to retrieve the robot's IP address.
- Copy the IP address and paste it into RealVNC Viewer, then click "Connect".
- Once connected, you should see the Raspberry Pi desktop on your screen.
- You can now disconnect the HDMI cable, mouse, and keyboard from the robot.
File Setup and Calibration
Navigate to cs371/picar-x/example/picar/ to find the core program files:
- calibrate.py: This script generates a grayscale calibration profile for the line sensors. Run this first to capture sensor readings under your specific lighting conditions. The script provides on-screen instructions and outputs three calibration values.
- V13.py: This is the main line-following control program. Replace the three placeholder values in this file with the calibration values generated from
calibrate.py to ensure accurate line detection.
Note: Calibration must be performed on your specific track and lighting environment for optimal performance.
Files and Assets
Download the track assets below for printing and testing.
Download lines.zip
This ZIP file contains printable track assets designed for the printer so you can create a consistent line-following course.
Download picar.zip