Display information on an OLED serial connected I2C
device in three text sizes and two colors.
- Use
raspi-config
to enableI2C
interface - Install
docker
andgit
- Clone this repository
- Change directory and run
make
- Connect display using female-to-female GPIO jumper cables
Original written by [email protected]
- RaspberryPi Model 3/4
- 128x64 pixel, 0.96", yellow/blue
I2C
OLED display - Female-Female
GPIO
cables
The serial connection may need to be enabled; use the raspi-config
command-line program; for example:
% sudo raspi-config
A terminal-based interface will launch and provide menu options to enable the I2C
interface; for example:
The indicated display supports up to eight (8) lines of text, in three fonts and two colors. The first two lines of text are yellow and the last six lines are blue.
SMALL
- 8 lines; 20 characters/lineNORMAL
- 8 lines; 16 characters/lineBIG
- consumes 3 lines; 8 characters
The information displayed is dependent on the configuration options; the default:
display
- one ofdefault
,horizon
,custom
messages[]
- array of dict forcustom
displayfont
- font of messageline
- starting linetext
- text to displayalign
- alignment,left
,center
,right
; default:center
This information includes:
- device name
- TCP/IPv4 address
- time in UTC
- uptime in seconds
- 1, 5, 15, load average
- architecture (e.g.
armv7l
)
The specified display connects to the GPIO
pins on the RaspberryPi model 3 and 4 using the four (4) pins on the back of the display; these pins are:
VCC
- 3.3V current; recommendedPIN1
SDA
- serial data; requiredPIN3
SCL
- serial clock; requiredPIN5
GND
- ground; recommendedPIN9