LCD 20x4 Blue Backlight w/ I2C Interface Display Module
-
RM34.00
- Product Code: LCD4*20-BLUE-I2C
- Availability: In Stock
This 20 character by 4 line display has a very clear and high contrast white text upon a blue background/backlight. It also includes a serial I2C/IIC adaptor board pre-soldered to the back of the LCD. This means it can be controlled with just 2 I2C serial data pins (SDA & SCL) and so requires far less digital IO pins when controlled from a microcontroller. In total the module only requires 4 wires including 5V power and GND. Contrast adjustment is also provided by the daughter board via a potentiometer.
These modules are currently supplied with a default I2C address of either 0x27 or 0x3F. To determine which version you have check the black I2C adaptor board on the underside of the module. If there a 3 sets of pads labelled A0, A1, & A2 then the default address will be 0x3F. If there are no pads the default address will be 0x27.
The module has a contrast adjustment pot on the underside of the display. This may require adjusting for the screen to display text correctly.
Note: If pressure is applied to the I2C daughter board it is possible for it to bend and come contact with the LCD module. Please ensure when the LCD is installed in your application that no external object is applying pressure to the back of the module.
Features
For this experiment it is necessary to download and install the “Arduino I2C LCD” library. First of all, rename the existing “LiquidCrystal” library folder in your Arduino libraries folder as a backup, and proceed to the rest of the process.
Arduino Sketch:
#include <Wire.h> // Include Wire.h to control I2C #include <LiquidCrystal_I2C.h> //Download & include the code library can be downloaded below LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3, POSITIVE); // Initialize LCD Display at address 0x27 void setup() { lcd.begin (16,2); } void loop() { lcd.setBacklight(HIGH); //Set Back light turn On lcd.setCursor(0,0); // Move cursor to 0 lcd.print("QQtrading - TEST"); lcd.setCursor(0,1); lcd.print("Ideas Comes Real"); }
If you are 100% sure that everything is okay, but you don’t see any characters on the display, try to adjust the contrast control pot of the backpack and set it a position where the characters are bright and the background does not have dirty boxes behind the characters.
Still not working?
You will need to find the I2C address by yourself by running an I2C scanner:
//Written by Nick Gammon // Date: 20th April 2011 #include <Wire.h> void setup() { Serial.begin (115200); // Leonardo: wait for serial port to connect while (!Serial) { } Serial.println (); Serial.println ("I2C scanner. Scanning ..."); byte count = 0; Wire.begin(); for (byte i = 1; i < 120; i++) { Wire.beginTransmission (i); if (Wire.endTransmission () == 0) { Serial.print ("Found address: "); Serial.print (i, DEC); Serial.print (" (0x"); Serial.print (i, HEX); Serial.println (")"); count++; delay (1); // maybe unneeded? } // end of good response } // end of for loop Serial.println ("Done."); Serial.print ("Found "); Serial.print (count, DEC); Serial.println (" device(s)."); } // end of setup void loop() {}
Then open the serial monitor and select 115200 baud to get the address.
Find your sketch:
LiquidCrystal_I2C lcd(0x27);
Replace 27 to your module address.
Some change to 3F will do
LiquidCrystal_I2C lcd(0x3F);