YOU NEED
Raspberry Pi Model 3B+
SD card 8GB or more
Pimoroni 1.3-inch SPI colour LCD (240x240) BR (Digi-Key PIM476)
Raspberry Pi OS Lite (4 Mar 21+)
Python ST7789 library to control an ST7789 TFT LCD display
Pillow Python Imaging Library
SPI is a synchronous serial communication interface specification that was developed by Motorola in the mid-1980s to provide full duplex (transmit/receive data in both directions) synchronous serial communication between controller and peripheral devices. Synchronous in protocols means that the communication is controlled by a controller (the Raspberry Pi) that talks to the peripheral – in this case an LCD device.
The SPI protocol defines no special bits to manage data. Limiting this overhead allows for high-speed data streaming. To provide some flexibility in communication, the serial clock has two options – Clock Polarity (CPOL) and Clock Phase (CPHA) – which, when configured, establish one of four modes.
In mode 0, data input/output occurs at the rising edge of the clock signal, where the clock polarity is low. For mode 1, data input/output occurs at the falling edge of the clock signal, where the clock polarity is low. To engage mode 2, data input/output occurs at the falling edge of the clock signal, where the clock polarity is high. In mode 3, data input/output occurs at the rising edge of the clock signal, where the clock polarity is high. CPOL and CPHA values are specified as ‘0’ or ‘1’ to form the four unique modes.
Denne historien er fra December 2021-utgaven av Linux Format.
Start din 7-dagers gratis prøveperiode på Magzter GOLD for å få tilgang til tusenvis av utvalgte premiumhistorier og 9000+ magasiner og aviser.
Allerede abonnent ? Logg på
Denne historien er fra December 2021-utgaven av Linux Format.
Start din 7-dagers gratis prøveperiode på Magzter GOLD for å få tilgang til tusenvis av utvalgte premiumhistorier og 9000+ magasiner og aviser.
Allerede abonnent? Logg på
Create your first WebSocket service
Mihalis Tsoukalos explains how to use the Go programming language to work with the WebSocket protocol.
Fantastic Mr Firefox
Nick Peers takes a trip down memory lane to reveal the story behind the rise - and slight fall - of Mozilla's popular web browser.
Set up your terminal and email like it's 1983
Jump in the hot terminal time machine with Mats Tage Axelsson who emails from the command line using the latest technology.
Universal layer text effects with GIMP
Posters use them, films and presentations are hard to imagine without them: text effects. Attract attention with Karsten Günther and GIMP.
Jump to a federated social network
Nick Peers reveals how you can get up and running with this free, decentralised and non-profit alternative to Twitter.
Free our SOFTWARE!
Taking anything for granted is dangerous, so Jonni Bidwell and Mike Saunders revisit how the free software movement got started to help free us from proprietary tyranny!
Master RPI.GPIO
Les Pounder goes back to the early days of the Raspberry Pi - and his career with this classic library! -
Waveshare Zero to Pi3
Transform your Pi Zero into a Pi 3, they promised Les Pounder, but it's more like adding on go-faster stripes.
The Best OPEN SOURCE Software Ever!
In an attempt to trigger controversy, Michael Reed and Neil Mohr unequivocally state these are the greatest free software apps ever. Probably. We’re just trying to be helpful.
Linux-Mandrake 7
Simplicity and a wide range of applications make this a great distribution for all Linux users.