Skip to main content

Run the sensor validation script

Time: 11:35 AM to 12:15 PM
The facilitator will provide a pre-written validate_sensors.py script that tests each subsystem on your robot in sequence. Your goal: every test shows PASS.

What the script tests

The validation script checks seven subsystems in order:
TestWhat it checks
Motors and steering servoWheels spin and steering responds
Camera pan/tilt servosCamera moves left, right, up, and down
Ultrasonic distance sensorReads distance to objects in front
Grayscale/line-tracking sensorsReads surface brightness values
Speaker audio outputPlays a test sound through the speaker
Microphone captureRecords a short audio clip
Camera web streamStarts a live video feed

Run the script

cd ~/picar-x/example && sudo python3 validate_sensors.py
Read the output carefully. The facilitator will walk through each result live on screen share.

Camera check

The script starts a web stream. Open this URL in your browser to confirm live video:
http://picar-x.local:9000/mjpg
If you cannot access the stream by hostname, replace picar-x.local with your robot’s IP address.

Troubleshooting failures

If any test shows FAIL, try these steps in order:
  1. Check the wiring for that component
  2. Re-run the install script from the SSH setup step
  3. Power cycle the robot (unplug, wait 10 seconds, plug back in)
  4. Ask a TA for help in the breakout room

Day 1 wrap-up

Goal for Day 1: Every student ends with all sensors showing PASS and a confirmed SSH connection. This is the only objective for today.
Recap: SD card flashed, network connected, servos calibrated, all sensors validated. Preview for tomorrow: You will write real programs, make the robot move and speak, and use the camera for color detection.
Homework: Leave the robot plugged in and accessible on WiFi so Day 2 begins immediately with code.