Arduino Forum

Topics => Product Design => Topic started by: tudorcraft on Feb 26, 2019, 08:39 pm

Title: Contrast problem on i2c?
Post by: tudorcraft on Feb 26, 2019, 08:39 pm
I want to print something using the A1602 display with I2C shield, but when I print something, everything is white(see attachment).
Here is the code, by the way:

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address, if it's not working try 0x27.

void setup(){
  lcd.begin(16,2);   // iInit the LCD for 16 chars 2 lines
  lcd.backlight();   // Turn on the backligt (try lcd.noBaklight() to turn it off)
  lcd.setCursor(0,0); //First line
  lcd.print("I2C LCD Tutorial");
  lcd.setCursor(0,1); //Second line
  lcd.print("*Ardumotive.com*");
}

void loop(){
}
Title: Re: Contrast problem on i2c?
Post by: spycatcher2k on Feb 26, 2019, 08:57 pm
Adjust the variable resistor you have on the contrast pin.
Title: Re: Contrast problem on i2c?
Post by: tudorcraft on Feb 27, 2019, 08:36 am
Already tried that, it doesn't work. It just changes the brightness.
Title: Re: Contrast problem on i2c?
Post by: spycatcher2k on Feb 27, 2019, 07:46 pm
Then check your wiring! or better still, post your wiring diagram here.
Title: Re: Contrast problem on i2c?
Post by: wolframore on Mar 04, 2019, 05:32 pm
Are you using a 1602 with the backpack?  The blue potentionmeter on the backpack adjusts the contrast.  Have you tried that?  Please include pictures and wiring diagram.
Title: Re: Contrast problem on i2c?
Post by: TheMonkey on Mar 19, 2019, 06:21 pm
Your code says 0X27 and notes say to try 0x27 if not, so you seem to be aware of two addresses, but have you tried 0x3F?

Or maybe you got it working, it's a few weeks old. If you got it working, what was fix?