Waveshare 2.23" 128x32 pix OLED HAT RPi

128x32 Oled for Volumio (Raspberry Pi) ver 1.0 beta

oled_1b

This display (SSD1305 controller) is not supported by default by Volumio.
This program displays the main data of h ttp://volumio.local/api/v1/getState (status, duration/seek, volume, artist, title).
The “oled.c” program code I wrote is free to use based on the ht tp://www.waveshare.com/w/upload/c/c5/2.23inch-OLED-HAT-Code.7z demo.

Display type: Waveshare 2.23" OLED HAT, 128 x 32 pixel
h ttps://www.waveshare.com/wiki/2.23inch_OLED_HAT

C program code using the following libraries:
h ttp://www.airspayce.com/mikem/bcm2835/

=> Downloadable program and C source code: oled.zip
h ttp://users.atw.hu/oled/oled.zip
http://oled.atw.hu/

Brief information:

  • 1.0 beta, works but not perfect!
  • SPI must be enabled (sudo raspi-config)
  • the program is in C language (not C ++!)
  • bcm2835-1.69.tar.gz must be installed
  • libcurl must be installed
  • Install GCC for C compilation
  • always run with sudo: sudo ./oled
  • must be loaded into systemd for automatic startup:
[Unit]
Description=oled service
After=multi-user.target

[Service]
Type=idle

ExecStart=/usr/bin/sudo /home/volumio/oled

Restart=always

[Install]
WantedBy=multi-user.target
3 Likes

Ver 1.1 beta:

  • some bug fixes
  • display volume: MUTE status
  • centered Artist and Title if the text is sort

Ver 1.22 beta:

  • some bug fixes
  • smaller status line on top
  • playtime progress line
  • text paging (if artist or title more than 21 letter)
  • display track technical data for short time - after play

(Picture from finished, boxed project.)

oled_3b

Ver 1.24 beta:

  • some bug fixes
  • display track position
  • character redesigner util available (for ssd1305.h)

Latest version available: oled.atw.hu

Ver 1.26 beta:

  • some bug fixes
  • display repeat/shuffle status (with track position)
  • display Volumio local IP at starting

Ver 1.26 beta2:

Modified version also available in zip file: http://oled.atw.hu/

  • first line: small numbers redesigned
  • first line: no volume display, instead there is playback mode and track number

Ver 1.26 beta2:

oled_4b

Program & source code:
oled_b2.zip (68.4 KB)

1 Like

Ver 1.27 beta
Program & source code:
ver_1_27_beta.zip (68.6 KB)

Ver 1.28 beta:

  • Display volume and mute in bottom line (removed from right upper corner)

Program & source code:
ver_1_28_beta.zip (69.2 KB)

The data shown on the display:

  • Local IP address (at startup)
  • Play mode (stop/play/pause)
  • Track time (duration, percent line)
  • Repeat mode (1, all, shuffle)
  • Track number
  • Artist, title
  • Media format and quality (after play a track)
  • Volume (if changed, mute too)

Ver 1.32 beta:

  • Text scroll (Artist, Title) function
  • Scroll on/off: down volume to 0 (not mute!) and wait 5 sec: scroll off (or on). Up the volume.

Program & source code:

oled_v132beta.zip (70.2 KB)

Ver 1.33 beta:

  • minor bug fix

Program & source code:

oled_v133b.zip (70.2 KB)