Software Installation

Share for us
Share on facebook
Share on twitter
Share on pinterest
Share on whatsapp

1.    Log into Raspberry Pi

The TF card onto which the Raspbian has been burnt is inserted into the Raspberry Pi before. Now power the Raspberry Pi.

The installation may take a long time, so you’re recommended to supply Robot HATS by battery and the Raspberry Pi via a USB cable in case of power cut-off thus causing a sudden shutdown and file damage of the Raspberry Pi. You can directly power it via the Micro USB port because the Robot HATS won’t get damaged by it due to the built-pin protective circuit.

Plug in the USB Wi-Fi dongle (skip this if you use a Raspberry Pi 3 with the WiFi) and complete the setting in the way you’re comfortable with.

Log into the Raspberry Pi via ssh or ssh tools like PuTTY.

2.    Get Source Code

You can find the source code in our Github repositories. Download the source code by git clone:

 git clone –recursive

Check by the ls command, then you can see the code directory:


pi@raspberrypi:~ $ lsDesktop     Downloads    Pictures    python_games           TemplatesDocuments   Music        Public      SunFounder_PiCar-S     Videos

3.    Go to the Code Directory

cd ~/SunFounder_PiCar-S/

pi@raspberrypi:~ $cd SunFounder_PiCar-S/

Enter the code directory and you can see the installation script:

pi@raspberrypi:~/SunFounder_PiCar-S $ lsexample  install_dependencies  LICENSE  show

4.    Install the Environment

Installing Automatically by Script

You can get all the required software and configuration done with the installation script. If you want to do step by step instead, refer to the operations in Installing Manually below.

sudo ./install_dependencies


1. The installation script will install the required components and configure for the running environment. Make sure your Raspberry Pi is connected to the Internet during the installation, or it would fail.

2. The Raspberry Pi will reboot after the installation, so you need to log in again.

Installing Manually

1. Update the apt list

sudo apt-get update

2. Install python-smbus

sudo apt-get install python-smbus -y

3. Install the PiCar module

cd ~

git clone –recursive

cd SunFounder_PiCar

python install

4. Enable I2C

Edit the file /boot/config.txt

sudo nano /boot/config.txt

The “#” in front of each line is to comment the following contents which does not take effect in a sketch. The I2C configuration part is commented by default too. Add the following code at the end of the file, or delete the pound mark “#” at the beginning of related line; either way will do. 


5. Reboot

sudo reboot