Using 16 x 2 LCD with RGB LCD shield kit and R3 Uno
Moderators: adafruit_support_bill, adafruit

Using 16 x 2 LCD with RGB LCD shield kit and R3 Uno

by PierrePaul on Thu Dec 06, 2012 12:17 am

I am trying to use a blue and white 16 x 2 LCD (pid 181) with a RGB LCD shield kit (pid 715) mounted to a R3 Uno. The upper row lights (squares) but the lower row doesn't. Am I using the wrong shield for the blue & white LCD ? Should I be using another sketch instead of the one below ? I have attached a pic of my project. Thank you.

[Edit - moderator - please use the 'code' button when submitting code]

Code: Select all | TOGGLE FULL SIZE

Example code for the Adafruit RGB Character LCD Shield and Library

This code displays text on the shield, and also reads the buttons on the keypad.
When a button is pressed, the backlight changes color.


// include the library code:
#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>

// The shield uses the I2C SCL and SDA pins. On classic Arduinos
// this is Analog 4 and 5 so you can't use those for analogRead() anymore
// However, you can connect other I2C sensors to the I2C bus and share
// the I2C bus.
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

// These #defines make it easy to set the backlight color
#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6
#define BLUE 0x4
#define VIOLET 0x5
#define WHITE 0x7

void setup() {
  // Debugging output
  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);

  // Print a message to the LCD. We track how long it takes since
  // this library has been optimized a bit and we're proud of it :)
  int time = millis();
  lcd.print("Hello, world!");
  time = millis() - time;
  Serial.print("Took "); Serial.print(time); Serial.println(" ms");

uint8_t i=0;
void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:

  uint8_t buttons = lcd.readButtons();

  if (buttons) {
    if (buttons & BUTTON_UP) {
      lcd.print("UP ");
    if (buttons & BUTTON_DOWN) {
      lcd.print("DOWN ");
    if (buttons & BUTTON_LEFT) {
      lcd.print("LEFT ");
    if (buttons & BUTTON_RIGHT) {
      lcd.print("RIGHT ");
    if (buttons & BUTTON_SELECT) {
      lcd.print("SELECT ");
Shield with R3, view 1
P1020109.JPG (116.77 KiB) Viewed 604 times
Shield with R3, view 2
P1020106.JPG (90.58 KiB) Viewed 604 times
Posts: 1
Joined: Wed Dec 05, 2012 11:22 pm

Re: Using 16 x 2 LCD with RGB LCD shield kit and R3 Uno

by adafruit_support_bill on Thu Dec 06, 2012 7:15 am

The shield works with all of our 16x2 LCDs. Post clear photos of the front & back of the shield & we'll check the assembly. If you can size them a bit larger that what you have posted here, we can see the soldering a little better.
User avatar
Posts: 30887
Joined: Sat Feb 07, 2009 10:11 am

Re: Using 16 x 2 LCD with RGB LCD shield kit and R3 Uno

by Hackoholic on Fri Dec 28, 2012 7:51 am

Not sure if this was resolved privately or not but I saw something very similar to what was described. After building the shield and plugging it in, I adjusted the contrast pot almost all the way up and saw just the top row of cells and no backlight. Once I downloaded the library, properly renamed it and loaded up the "Hello World" sketch everything worked great and both rows displayed properly with a bright backlight. Before I loaded the sketch I was thinking something was wrong with the LCD but this appears to be normal behavior until a proper sketch is loaded to activate the backlight and display text on both rows.
Posts: 4
Joined: Fri Mar 16, 2012 12:50 pm