From 506af9d65b6f6e7c89d546a3e987c7a4cbe93dd0 Mon Sep 17 00:00:00 2001 From: Florian Klemenz Date: Wed, 4 May 2022 14:45:30 +0200 Subject: [PATCH] Added setup instructions --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/README.md b/README.md index e69de29..4613cd9 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,67 @@ +# FBDASH - lightweight dashboard for the RaspberryPi without X (using framebuffer only) +In order to setup the dashboard start with cloning this repo ;) + git clone https://git.klelifo.de/flo/fb-dash + cd fb-dash + + + +# Configure the display +**TL;DR** just run ```make rpi-config``` + +Some work is needed before we can actually use the ILI9341 display with the RaspberryPi.\ +Essentially we need to +* Enable the SPI interface +* Load the fbtft_device kernel module with the correct parameters +to get a working /dev/fb1 framebuffer device. + +## Enable SPI interface on the raspberry pi + echo "dtparam=spi=on" | sudo tee -a /boot/config + +## Activate modules to be loaded at boot + echo "spi_bcm2835" | sudo tee -a /etc/modules + echo "fbtft_device" | sudo tee -a /etc/modules + echo "options fbtft_device name=rpi-display gpios=reset:25,dc:24,led:18" | sudo tee -a /etc/modprobe.d/fbtft_device.conf + + + + +# Setup fbdash binary +***TL;DR** just run ```sudo apt install -y libmariadb2 && make install``` + +After the display is setup we can build and install the fbdash binary. + +## Build the sources + sudo apt install libmariadb2 + make + +## Install in /usr/bin + sudo make install + +## Test it + fbdash + + + +# Use systemd for regular updates +While we could also use cron for regular execution of the fbdash binary I opted to use systemd this time.\ +The future is now ... ;) + +## Install unit files +**TL;DR** just run ```make systemd-config``` + +The following files use systemd to setup a regular update of the dashboard screen (60s by default).\ +If you like to change the default, just edit the ```fbdash.timer``` file before reloading systemctl + + sudo cp setup/fbdash.service setup/fbdash.timer /etc/systemd/system + sudo systemctl daemon-reload + sudo systemctl enable fbdash.timer + sudo systemctl start fbdash.timer + +## Check timers + systemctl list-timers + NEXT LEFT LAST PASSED UNIT ACTIVATES + Wed 2022-05-04 14:16:10 CEST 28s left Wed 2022-05-04 14:15:10 CEST 31s ago fbdash.timer fbdash.service + ... + + +