Installation

Topic

  1. Introduction

  2. Install All the Modules

  3. Enable I2C Interface

Introduction

Newest version of raspberry-pi should process in python environment

Install All the Modules(Important)

Install:

sudo apt update
sudo apt upgrade -y
# for Lite version OS.
sudo apt install git python3-pip python3-setuptools python3-smbus

Newest version of raspberyy-pi should enter environment:

python3 -m venv venv
source venv/bin/activate

Install root-har:

cd ~/
git clone -b v2.0 https://github.com/sunfounder/robot-hat.git
cd robot-hat
sudo python3 setup.py install

Then download and install the vilib module:

cd ~/
git clone -b picamera2 https://github.com/sunfounder/vilib.git
cd vilib
sudo python3 install.py

Download and install the picar-x module.

cd ~/
git clone -b v2.0 https://github.com/sunfounder/picar-x.git
cd picar-x
sudo python3 setup.py install

Run the script i2samp.sh to install the components required by the i2s amplifier, otherwise the picar-x will have no sound.

cd ~/picar-x
sudo bash i2samp.sh

Enable I2C Interface(Important)

Enter raspberry pi configuration:

sudo raspi-config

Choose Interfacing Options:

raspi-config

Select I2C:

  1. Select <Yes>

  2. Select <Finish>

  3. Reboot

I2C Tools