Skip to main content

Using LCD 2004a I2C on project with Arduino

On previous post measurement sensor results displayed on serial monitor. This is good when we are on development stage. When we want something more independent we need external display. I have purchased a few type of display. For now we will use LCD 2004 for external display.




This LCD has 20 cols x 4 rows size. Not much information we can show on this small display. Above LCD use SPI or I2C interface. The reason I choose I2C interface is we only use 2 main pin for connection. This is useful when we use a lot of device on Arduino.

Wiring



Above image shows the LCD back view. The I2C interface module has potentiometer to adjust backlight brightness and jumper to turn on or off backlight. The wiring is simple.
  • GND <----> Gnd
  • VCC <----> 5v
  • SDA <----> A4 (Analog pin 4)
  • SCL <----> A5 (Analog pin 5)
Note that one of the advantage using I2C interface is that we can use many devices on same pin. In this case I use LCD display in parallel with GY BMP 280 that has I2C interface too. 


Library

Download library here and copy the folder into Arduino library.

Sketches

Run the test sketch from my github : https://github.com/satujamsaja/Arduino/tree/master/lcdi2c and implementation on the project that display DHT 22 and GY BMP 280 https://github.com/satujamsaja/Arduino/tree/master/dht22bmp28020x4 .

Good Luck.

Comments

Popular posts from this blog

Read temperature and barometric pressure from GY BMP 280 using Arduino

This sensor based on BMP 280 digital pressure sensor made by Bosch. You can find the complete datasheet here . This small sensor is quite impressive with it's accuracy. It claimed to be ±1 hPa in measuring barometric pressure, ±1.0°C in temperature measurement and ±1 meter in altitude accuracy. Pretty impressive right ?

RDA5807M FM radio module for Arduino

I was surprised with it's ability to receive FM radio broadcast without any problem in such a small module. The size is not bigger than a coin, really small. It may a bit difficult for wiring but it can be done. You can also add small power audio amplifier and use small speaker directly. Here is the module chip, small power amplifier in prototyping pcb.