To begin with, wiringPi
is a C library mainly used to interface with the Raspberry Pi's GPIO. The library actually includes a LCD header (it is part of the wiringPi dev library, so you must include it as wiringPiDev
). However, what wiringPi
doesn't include is a LCD header for I2C-backmounted LCDs. Most of the time, the I2C backpack module is just a GPIO expander that communicates with the LCD in 4-bit mode (that is, it only uses 4 data pins instead of 8. While data are sent at half speed, they are still set so fast that you can't tell if an LCD operates in 4-bit or 8-bit mode). We are assuming your LCD can operate in 4-bit mode and that the schematic of your I2C backpack is similar to that of https://manualzz.com/doc/8253437/i2c-lcd-backpack-schematic.
- Firstly, check if the
wiringPi
library is already installed by typing:
gpio readall
to the terminal. If you get something like:
Unable to determine board type