# Step by step setup guide # Image Download the last stretch image from here: ``` http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian_lite/images/raspbian_lite-2019-04-09/2019-04-08-raspbian-stretch-lite.zip ``` And install it on your pi with a program like [Etcher](https://www.balena.io/etcher/) Once it's flashed, open the partition that appears and create two new files: * ssh (blank) * wpa_supplicant.conf The file _ssh_ can be blank, but the contents of wpa_supplicant.conf should look as follows: ``` country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="WIFI_SSID" scan_ssid=1 psk="WIFI_PASSWORD" key_mgmt=WPA-PSK } ``` # Change the password Just do eet: ```bash pi@raspberrypi:~ passwd ``` # raspi-config First, set up the camera, the RAM split and expand the disk with the rpi-config command: ```bash pi@raspberrypi:~ $ sudo raspi-config ``` First set up camera with option 5: ![raspi-config-mainscreen](images/raspi-config-mainscreen.png) Then choose P1 Camera: ![raspi-config-mainscreen](images/raspi-config-camera.png) Then go back to the main screen and choose option 7: ![raspi-config-mainscreen](images/raspi-config-mainscreen7.png) First Expand Filesystem A1: ![raspi-config-mainscreen](images/raspi-config-advanced-expand.png) Then return to option 7 again and choose A3 memory split: ![raspi-config-mainscreen](images/raspi-config-advanced-memory.png) Set this to 256 and then exit raspi-config. When prompted to restart, select yes - this is to ensure the disk is resized before we updated. # Update the system First install screen, so that you don't have to worry about a disconnect mid update: ```bash pi@raspberrypi:~ $ sudo apt update && sudo apt install screen -y ``` Then start screen and update: ```bash pi@raspberrypi:~ $ screen pi@raspberrypi:~ $ sudo apt upgrade -y ``` This will take some time... ![raspi-config-mainscreen](images/updates.png) # Update the firmware raspbian comes with a firmware updating tool, do so now: ```bash ``` # UV4L Packages Once updates are complete install uv4l packages. First, install the gpg key for the repo, so the pi trusts it: ```bash pi@raspberrypi:~ $ curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add - % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 26703 100 26703 0 0 116k 0 --:--:-- --:--:-- --:--:-- 116k OK ``` Then add the repository to apt sources and check the file after to confirm: ```bash pi@raspberrypi:~ $ echo -e "\ndeb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main" | sudo tee -a /etc/apt/sources.list deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main pi@raspberrypi:~ $ cat /etc/apt/sources.list deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main ``` ```bash pi@raspberrypi:~ $ sudo apt install uv4l uv4l-raspicam uv4l-raspicam-extras ``` ```bash pi@raspberrypi:~ $ sudo reboot ``` # Install uv4l packages Install all the required packages