Appendix 1: Function of the Server Installation Scripts

You may have a question: What do the installation scripts do when we install the server on the Raspberry Pi by them? So here let’s check the detailed steps.

  1. Install pip.

sudo apt-get install python-pip
  1. Use pip to install django.

sudo pip install django
  1. Install i2c-tools and python-smbus.

sudo pip3 install smbus2
  1. Install PiCar drivers.

cd ~/
git clone -–recursive
cd SunFounder_PiCar
sudo python install
  1. Download source code.

cd ~/
git clone -b V3.0
  1. Copy the MJPG-Streamer file to system directory.

cd ~/SunFounder_PiCar-V
sudo cp mjpg-streamer/mjpg_streamer /usr/local/bin
sudo cp mjpg-streamer/ /usr/local/lib/
sudo cp mjpg-streamer/ /usr/local/lib/
sudo cp mjpg-streamer/ /usr/local/lib/
sudo cp -R mjpg-streamer/www /usr/local/www
  1. Export paths.

export LD_LIBRARY_PATH=/usr/local/lib/ >> ~/.bashrc
export LD_LIBRARY_PATH=/usr/local/lib/ >> ~/.profile
source ~/.bashrc
  1. Enable I2C1.

Edit the file /boot/config.txt:

sudo nano /boot/config.txt

Add the line in the end:

  1. Reboot.

sudo reboot