1602 LCD

1602 I2C LCD display on the Raspberry Pi


1602 LCD

The 1602 LCD display with 2 rows, 16 characters each. Connected with a I2C backboard. Currently showing the (Python read) temp and humidity output from a DTH11 sensor.

So you want some output from your RPi without an actual display attached?

 

I2C backplate

The I2C connector that has 4 pins for the RPi connection. The potentiometer is for LCD contrast and it has a power on LED on the right, above the jumper.

One of the cheapest solutions is to get a 16×2 or a 20×4 (ie 1602 or 2004) LCD display. You can get versions that have a I2C backplate or just the actual display with 16 connectors.

If you’re a newbie like me, your best bet is to get one with the connector already attached since it will not cost you much more; displays with connectors go from 3 to 8 eur and the connector separately for around 1,3 eur. Also, less wires and NO soldering required.

The connector uses only 4 pins on the RPi; 5V, ground and two data busses, the SDA and SCL.

Since the connection type is serial, you could theoretically attach multiple displays as long as they all use a different address. The problem is that 99,9% of them use the same address; ie. address 27.

By default Raspian, which I’ll use in my examples, has the I2C disabled – so make sure the first thing you do is enable it either by running the raspi-config or editing the config files. Don’t forget to install python-smbus and i2c-tools either.

Now, the most “working” combination of Pyton code and libraries I’ve found, since most of the actual 1602 stuff is written for Arduino, was here.

(Maybe I’ll post the actual code I’m running to read my hard dive space and the temp/humidity later…)