Skip to content

dcmartin/oled

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⎚ - oled

Display information on an OLED serial connected I2C device in three text sizes and two colors.

  1. Use raspi-config to enable I2C interface
  2. Install docker and git
  3. Clone this repository
  4. Change directory and run make
  5. Connect display using female-to-female GPIO jumper cables

Original written by [email protected]

Parts

  • RaspberryPi Model 3/4
  • 128x64 pixel, 0.96", yellow/blue I2C OLED display
  • Female-Female GPIO cables

Step 1 - Enable I2C interface

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:

Step 2 - Configuration

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/line
  • NORMAL - 8 lines; 16 characters/line
  • BIG - consumes 3 lines; 8 characters

The information displayed is dependent on the configuration options; the default:

  • display - one of default, horizon, custom
  • messages[] - array of dict for custom display
  • font - font of message
  • line - starting line
  • text - text to display
  • align - alignment, left, center, right; default: center

default display

This information includes:

  • device name
  • TCP/IPv4 address
  • time in UTC
  • uptime in seconds
  • 1, 5, 15, load average
  • architecture (e.g. armv7l)

Step 3 - Connection

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; recommended PIN1
  • SDA - serial data; required PIN3
  • SCL - serial clock; required PIN5
  • GND - ground; recommended PIN9

GPIO Reference

About

Oled display example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.4%
  • Other 0.6%