Repository navigation
Wiring
Every supported module hangs on I2C: four wires. The Waveshare LCD1602 I2C and RGB modules bring a PH2.0 four-pin lead; a backpack module has a four-pin header.
flowchart LR
subgraph Pi["Raspberry Pi 40-pin header"]
P2["pin 2 · 5V"]
P3["pin 3 · GPIO 2 · SDA1"]
P5["pin 5 · GPIO 3 · SCL1"]
P6["pin 6 · GND"]
end
subgraph LCD["LCD1602 module"]
VCC
SDA
SCL
GND
end
P2 --- VCC
P3 --- SDA
P5 --- SCL
P6 --- GND
| Module pin | Raspberry Pi | BCM | Header pin |
|---|---|---|---|
| VCC | 5 V (pin 2 or 4). 3.3 V (pin 1) only for a module whose own sheet says it runs at 3.3 V, the Waveshare among them. | 2 | |
| GND | GND | 6 | |
| SDA | SDA1 | GPIO 2 | 3 |
| SCL | SCL1 | GPIO 3 | 5 |
5 V is the safe choice. A character LCD's contrast comes from the voltage between VDD and V0, and every HD44780-class module sets V0 for a 5 V supply: by a trimmer on a backpack, by a fixed resistor on an integrated module without one (the Freenove 1602IIC, for one). Fed 3.3 V such a module lights its backlight and shows nothing, or a flicker, whatever is written to it; it is not a software fault. The Waveshare LCD1602 I2C and RGB modules carry their own supply circuit and run at either voltage.
At 5 V the module's I2C pull-ups lift SDA and SCL to 5 V against the Pi's 1.8 kΩ pull-ups to 3.3 V. This is common practice on the Pi and what Freenove's and Waveshare's own guides show; the strictly correct wiring for a 5 V module is a level shifter on SDA and SCL.
Volumio's own boot configuration enables this bus (dtparam=i2c_arm=on); nothing to write.
The connection section of the settings page offers two more, each written to /boot/userconfig.txt between the plugin's marks when you save, and asking for a restart:
| Setting | Lines written | Pins |
|---|---|---|
| Hardware bus 0 | dtparam=i2c_vc=on |
GPIO 0 (SDA0, pin 27), GPIO 1 (SCL0, pin 28). The HAT EEPROM bus; free when no HAT uses it. |
| Software bus on chosen pins | dtoverlay=i2c-gpio,bus=3,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2 |
Any two GPIOs, by BCM number. Slower than a hardware bus; 10 to 15 frames a second suit it. |
The plugin removes its lines when it is uninstalled.
| Module | Controller | I2C addresses | Backlight |
|---|---|---|---|
| Waveshare LCD1602 RGB Module | AiP31068L | 0x3E, RGB at 0x60 (PCA9633) | RGB |
| Waveshare LCD1602 I2C Module | AiP31068L | 0x3E | Fixed, always on |
| Grove LCD RGB Backlight v4 | JHD1313 (AiP31068 compatible) | 0x3E, RGB at 0x62 | RGB |
| Grove LCD RGB Backlight v5 | AiP31068 | 0x3E, RGB at 0x30 | RGB |
| DFRobot Gravity RGB LCD1602 | AiP31068 | 0x3E, RGB at 0x60, 0x6B or 0x2D by revision | RGB |
| A 1602 on a PCF8574 backpack | HD44780 behind the expander | 0x27 (PCF8574) or 0x3F (PCF8574A); 0x20 to 0x27 and 0x38 to 0x3F by jumpers | On or off, through the backpack's pin |
| Freenove 1602IIC (FNK0079 kit) | HD44780 behind an integrated PCF8574, no contrast trimmer | 0x27 (PCF8574T) or 0x3F (PCF8574AT) | On or off, through the expander's pin |
| Winstar WEH001602 OLED on a backpack | WS0010 behind the expander | as the backpack | None (OLED) |
| Winstar WEO/WEA, Newhaven NHD-0216CW OLED | US2066 | 0x3C or 0x3D | None (OLED) |
| Midas MCCOG21605, Newhaven NHD-C0216CiZ | ST7032i | 0x3E | Fixed |
The Displays page says how the plugin tells them apart and which it has to be told.
On an x86 player the plugin works with a USB I2C adapter that gives a /dev/i2c-N (a CH341A board, for one). Set the bus number on the settings page to the adapter's; no boot configuration is written on a PC.
Glass is free and open source, designed, built and maintained by one developer in his own time. If it has earned a place on your player:
Provided as-is under the MIT licence; sponsorship is a thank-you, not a purchase: it buys no priority, no features and no support agreement.