PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
N_Man
 
Posts: 3
Joined: Fri Nov 16, 2012 9:14 pm

PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by N_Man »

Hi,

I have purchased a LCD Shield Kit with 16x2 Character White on Blue Display for my ARDUINO UNO. After connecting it and loading the following code I get lit up squares on the first line and nothing on the second line . Does that mean that the shield I got is defective?

Any helps would be highly appreciated.

Code:

Code: Select all

/*********************

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
  Serial.begin(9600);
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  lcd.setCursor(0, 1);   
  // 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!");
  //lcd.println("it is me");
//  time = millis() - time;
//  Serial.print("Took "); Serial.print(time); Serial.println(" ms");
  lcd.setBacklight(WHITE);
}

uint8_t i=0;
void loop() {
//    lcd.println("Hello, world!");
//  lcd.println("it is me");
}
Photo on 12-11-16 at 8.20 PM.jpg
Photo on 12-11-16 at 8.20 PM.jpg (101.22 KiB) Viewed 3967 times
Photo on 12-11-16 at 8.20 PM #2.jpg
Photo on 12-11-16 at 8.20 PM #2.jpg (115.13 KiB) Viewed 3967 times

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by adafruit »

what happens when you plug the shield ONTO the arduino?

N_Man
 
Posts: 3
Joined: Fri Nov 16, 2012 9:14 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by N_Man »

Well it is the same story.
Photo on 12-11-16 at 8.43 PM.jpg
Photo on 12-11-16 at 8.43 PM.jpg (105.46 KiB) Viewed 3961 times
adafruit wrote:what happens when you plug the shield ONTO the arduino?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by adafruit »

does pressing buttons change the LED on/off state?

N_Man
 
Posts: 3
Joined: Fri Nov 16, 2012 9:14 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by N_Man »

Well initially I loaded the Hello World example, which had the button checking and functionality in the loop portion of the code. However, the LED would not display anything and would keep flickering. Pressing the buttons did change the LED to off or on depending on which button was pressed. Then I decided to remove all the code inside the loop section. In this case the screen does not flicker, however it only displays the squares. Now pressing the buttons does not do anything since there is no code for it. If there any particular code you want me to try?

adafruit wrote:does pressing buttons change the LED on/off state?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by adafruit »

go back to the original code, twist the contrast knob once in a while to check if letters show up. if the buttons 'do something' to the backlight then the chip is working - there might be something wrong with the LCD. check your connections. is the LCD from adafruit?

shuma
 
Posts: 2
Joined: Sun Feb 10, 2013 2:18 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by shuma »

Hi.
I have exactly the same problem here.
The LCD is only displaying a row of square.
Buttons works, with the code below i can switch the backlight on and off, I was able to control a steeper motor hooked to the arduino with the shield buttons. So I assume the chip and the connection is ok.

I have doublecheck my soldering it's seam clean too.

Do you think it' a wiring problem or the LCD is defective?

Code: Select all


/*********************

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();

#define YELLOW 0x3
void setup() {
  // Debugging output
  Serial.begin(9600);
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  lcd.setBacklight(0x1);
  // 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 :)
  lcd.clear();
  int time = millis();
  lcd.print("Hello, world!");
  time = millis() - time;
  Serial.print("Took "); Serial.print(time); Serial.println(" ms");
}

void loop() 
{
uint8_t buttons = lcd.readButtons();

  if (buttons) {
    lcd.clear();
    lcd.setCursor(0,0);
    if (buttons & BUTTON_UP) {
      lcd.print("UP ");
      lcd.setBacklight(0x1);
    }
    if (buttons & BUTTON_DOWN) {
      lcd.print("DOWN ");
      lcd.setBacklight(0x0);
    }
  }
}

Image
Image
Image

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by adafruit_support_rick »

Well, from the pictures I think I can see several issues. First of all, you should not be powering the shield from Vin. You should be connecting t o the 5V pin on the arduino.

VIn is the unregulated input. Since you're using USB to power the board, this is going to be 5V, which is fine, but if you were to decide power the board with a 9V supply through the barrel jack, then VIn would be 9V, which would likely damage the shield.

several solders on the 16-pin LCD appear to be cold joints - the solder is blobbed up and hasn't flowed onto the pad. Solder joints should look like this:
Solder%20Joint.gif
Solder%20Joint.gif (7.78 KiB) Viewed 3698 times
See our Guide To Excellent Soldering for more information.

Finally, your jumper wires for power, ground, SDA and SCL don't appear to be soldered at all. You cannot expect a reliable connection if the wires are simply inserted into the holes.

shuma
 
Posts: 2
Joined: Sun Feb 10, 2013 2:18 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by shuma »

Thank you DriverBlock.
May be I was to confidant in my soldering abilities :)
You were right, solders on the 16-pin LCD wasn't so good and a for a few of them it hasn't flowed onto the pad.
I have redone the soldering in the LCD and now working great. Beginner Mistake :)

And I don't power the shied with the Vin pin but with the regulated 5v. The Vin is connected to a stepper motor driver card on a breadboard not shown on the photo. and to power the arduino when i am on battery (10 volt)

User avatar
sloft
 
Posts: 3
Joined: Tue Apr 09, 2013 4:57 pm

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White on Blue Display

Post by sloft »

I had the same problem but whit the Raspberry Pi, I confirm it was just a soldering problem, after double-check my solders I succeed get the LCD working.

User avatar
RajaNaqiuddin
 
Posts: 8
Joined: Mon Oct 31, 2016 4:55 am

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White o

Post by RajaNaqiuddin »

Hi,

For my case, it's a bit different.
I plan to get temperature and humidity readings from the Grove RH_T Mini Sensor module and display it on the LCD.

The LCD works fine when the sensor is not connected. However, when the sensor is connected, the square display will show up.
Non of the buttons work in this condition, even the reset button.

Both sensor and LCD have completely different addresses.

Here's my code

Code: Select all


#include <Wire.h>
#include <Adafruit_RGBLCDShield.h>
#include <utility/Adafruit_MCP23017.h>
#include <TH02_dev.h>

Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();


#define BL 0x7

int menu = 0;
int als = A0;
int lval = 0;
float humidity = 0;
float temper = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  lcd.begin(16, 2);
  lcd.setBacklight(BL);
  TH02.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
  uint8_t buttons = lcd.readButtons();
  
  if (buttons) {
    lcd.clear();
    if (buttons & BUTTON_UP) {
      //delay(200);
      if(menu>1){
        menu--;
      }
    }
    if (buttons & BUTTON_DOWN) {
      //delay(200);
      if(menu<3){
        menu++;
      }
    }
  }

  switch(menu){
    case 1:
    lcd.setCursor(0,0);
    lcd.print("Humidity");
    lcd.setCursor(0,1);
    humidity = TH02.ReadHumidity();
    lcd.print(humidity);    
    break;
    case 2:
    lcd.setCursor(0,0);
    lcd.print("Temperature");
    lcd.setCursor(0,1);
    temper = TH02.ReadTemperature();
    lcd.print(temper);
    break;
    case 3:
    lcd.setCursor(0,0);
    lcd.print("Ambient Light");
    lval = analogRead(als);
    delay(3);
    lcd.setCursor(0,1);
    lcd.print(lval);
    break;
    default:
    lcd.setCursor(0,0);
    lcd.print("Environmental");
    lcd.setCursor(0,1);
    lcd.print("Sensor Module");
  }

}


User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White o

Post by adafruit_support_rick »

You may be hitting the LCD too fast. Try putting a delay(100) in loop.

What happens if you comment out the call to TH02.begin()?

User avatar
RajaNaqiuddin
 
Posts: 8
Joined: Mon Oct 31, 2016 4:55 am

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White o

Post by RajaNaqiuddin »

Hi,

I've tried adding the delay and commenting TH02.begin(). Both solutions don't work
The same symptom still happens.

Any other ideas? Has anyone tried running the Grove TH02 sensor with the Adafruit LCD shield?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White o

Post by adafruit_support_rick »

You're running this on a Uno?

I don't see anything to suggest a problem in the TH02 datasheet. I don't know what the problem could be. I've not seen anyone try this combination before.

So, just attaching the TH02 to the I2C bus causes the problem with the LCD? Or do you also need to have the TH02 library included in the code?

User avatar
RajaNaqiuddin
 
Posts: 8
Joined: Mon Oct 31, 2016 4:55 am

Re: PROBLEM WITH: LCD Shield Kit with 16x2 Character White o

Post by RajaNaqiuddin »

Hi,

I'm using this on an Arduino Uno.
If I run the LCD only, it works fine.
I also tried running the sample code from the TH02 library. It also works fine.

As I connect both modules together, the program will hang.

I tried to set a debug code to pin-point where the program would stop working.
The program will hang during lcd.begin();

Any ideas?

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”