Skip to content

01 Installation

lovebootcaptain edited this page Jun 30, 2020 · 2 revisions

Setup your Pi

install jessie to a sd card and update

  • get the latest NOOBS installer
https://www.raspberrypi.org/downloads/noobs/

i used NOOBS v2.1.0 which was the latest version for now

setup the SD card

follow the instructions from raspberrypi.org to setup your sd card and operating system

the first boot

finish your setup by following this guide

enable SPI

enable SPI in raspi-config - Interfacing Options

connect to your WiFi

to connect to a wifi network follow this guide

update all tools

  • when your connected to your wifi open up a terminal and type:
sudo apt-get update -y && sudo apt-get upgrade -y

set up the TFT

for ili9341 displays from adafruit

for other displays like this you may have to build your own kernel module or find it from your seller.

  • in /boot/config.txt, add in the following at the bottom
# TFT display and touch panel
dtoverlay=rpi-display
dtparam=rotate=0
  • change /boot/cmdline.txt to add the following to the end of the existing line
fbcon=map:10 fbcon=font:VGA8x8 logo.nologo

for Pimoroni Hyperpixel4

just change "FRAMEBUFFER": "/dev/fb1" to "FRAMEBUFFER": "/dev/fb0" later in your config file

you can also change "FPS" to 60 and "AA" to true for mx quality and frames per second. but 30 is more than enough.

it's just needed for the particle simulation for precipitation types like rain and snow.

Everything from 15-30 fps should give you decent animations.

install and configure WeatherPi_TFT

git clone https://github.com/LoveBootCaptain/WeatherPi_TFT.git
cd WeatherPi_TFT

install the dependencies in python3

since the script has to be run by a root user you have to install the dependencies with sudo

sudo pip3 install -r requirements.txt

create a ram disk to protect your sd card

NEW PLEASE UPDATE

WeatherPiTFT will write a json file to your Pi after updating the weather data from the api provider.

this process will reduce writing to your sd card, cause we're writing it only to RAM.

ramdisk will only be used in production mode. means you have set your "ENV" to "Pi" which is default when you followed this guide.

you may also consider using great tooling for writing all logs to ram from @azlux: log2ram

sudo mkdir /mnt/ramdisk
sudo nano /etc/fstab

add the following line right at the end of the opened file

size=5M specifies the size of the reserved ram (5M is more than enough)

tmpfs /mnt/ramdisk tmpfs nodev,nosuid,size=5M 0 0

CTRL-O to save and CTRL-X to quit nano

finally mount the ram disk and reboot your Pi

sudo mount -a
sudo reboot

while your Pi reboots grep your API key ...