These are essential for basic operation:
sudo apt-get update
sudo apt-get install -y python3-pip python3-numpy python3-smbus i2c-tools
For interfacing with motors, encoders, and sensors:
# For GPIO/PWM (Motor Control)
sudo apt-get install -y python3-gpiozero
# For I2C devices (Compass, Encoders, INA219)
sudo pip3 install smbus2 ina219
# For Camera (OpenCV)
sudo apt-get install -y python3-opencv libopencv-dev
For gamepad input handling:
sudo pip3 install inputs
For voice feedback:
sudo apt-get install -y festival
For data logging:
sudo pip3 install fastlogging
For timing and system commands:
sudo apt-get install -y python3-time
You can run this all-in-one command to install everything:
sudo apt-get update && \
sudo apt-get install -y python3-pip python3-numpy python3-smbus i2c-tools python3-gpiozero python3-opencv libopencv-dev festival python3-time && \
sudo pip3 install smbus2 ina219 inputs fastlogging
-
Enable I2C & Camera:
sudo raspi-config
- Navigate to Interfacing Options → Enable I2C and Camera
-
Set Audio Output (for TTS):
sudo amixer cset numid=1 100%
-
Test Components:
- Verify I2C devices:
sudo i2cdetect -y 1
- Test text-to-speech:
echo "SCUTTLE is ready" | festival --tts
- Verify I2C devices:
- If
python3-opencv
fails, try:sudo pip3 install opencv-python
- If gamepad isn’t detected, check USB permissions or try:
sudo chmod a+rw /dev/input/js0