-
Notifications
You must be signed in to change notification settings - Fork 9
Raspberry Pi configuration
This is a work in progress - I will add to it as development progresses
Note that the steps described below are necessary to get to a position where the Europi software can be installed on a Raspberry Pi.
Starting with a new, clean install of Raspbian, perform all the usual steps to get it connected to the Internet, secured etc., I am not going to try and document that process here, as it is better to simply refer to www.raspberrypi.org. Suffice it to say that the minimal steps, starting from a new, clean install of Raspbian Jessie are:
- open a terminal and type sudo raspi-config to open the Config utility
- Expand Filesystem
- Select Boot options, and choose Console Autologin (we don't want it booting into X all the time)
- Select Advanced, and enable SPI and I2C
- Finish and Reboot
Alternatively, use the Raspberry Pi Imager, which is a free SD Card imager to download and flash the SD Card. One of the advantages of this is that it has a 'Hidden Menu', which you select using Ctrl+Shift+X and which enables you to pre-enable SSH, and WiFi access, which is very handy if you are setting up a Pi in Headless mode.
Once the initial steps are completed, make sure the Pi is connected to the Internet, then run:
sudo apt-get update
sudo apt-get upgrade (this can take some time)
make sure the Pi is on the latest firmware:
sudo rpi-update
Note: It will need to be re-booted after the firmware update
Enable the SPI and I2C busses, abd set the I2C Bus to its maximum baud rate of 400KHz
sudo nano /boot/config.txt
Find and uncomment the following lines:
dtparam=spi=on
dtparam=i2c_arm=on
and add the following at the end of the second of those. This sets the I2C bus speed to its maximum value of 400KHz:
dtparam=i2c_arm=on,i2c_arm_baudrate=400000
Check that the SPI and I2C busses are enabled:
The following will list all devices on the I2C bus, which is handy when fault-finding connectivity to I2C devices.
i2cdetect -y 1
Install some programs we'll need later:
sudo apt-get install i2c-tools libopenal1 libopenal-dev automake libtool cmake libbsd-dev
Install the Kernel Headers (not included in the Lite version of the OS and, seemingly missing from the full Stretch version too)
sudo apt-get install libraspberrypi-dev raspberrypi-kernel-headers
Install the PIGPIO Library:
wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
make
sudo make install
In the early versions of Raspbian, small TFT Screens were supported via separate device drivers. Originally this involved re-building the kernel but, since around 2015, these separate drivers are in the Linux Kernel staging tree.
Versions of Debian/Raspbian built upon Linux kernel version 5.4 onwards no longer supports / includes the fbtft_device driver. Instead, TFT screens are supported through the use of Device Tree Overlays.
For instruction on installing the Legacy fbtft_driver see here
Next: