Screen just flickers using LiquidTWi lib

HI all.

I have an Amazon i2C screen, I am using the liquidTWI library, unfortunately it just flickers when I try to use the example sketch and never displays anything.

I used a test sketch and serial monitor to confirm the address of the I2c and it is correct.

When I use the wrong address the screen stays static but when i upload the test sketch "hello world" it flickers.

Any ideas?

post a link to the so called "Amazon i2C screen" and post the so called code for the "test sketch"... (please use code tags).

Also post a hand drawn diagram of the various connections and describe the power supply.

The screen appears to be recognised as connected correctly as the code for getting the i2c address via serial monitor works great.

The connections are as follows

Clock from screen -> A5
Dat from screen -> A4
Vcc-> +5v ( also tried external +5v injection and also stand alone external +5v power with no change)
GND -> common ground

Display:

/*
 Demonstration sketch for Adafruit i2c/SPI LCD backpack
 using MCP23008 I2C expander
 ( http://www.ladyada.net/products/i2cspilcdbackpack/index.html )

 This sketch prints "Hello World!" to the LCD
 and shows the time.
 
  The circuit:
 * 5V to Arduino 5V pin
 * GND to Arduino GND pin
 * CLK to Analog #5
 * DAT to Analog #4
*/

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


// Connect via i2c, default address #0 (A0-A2 not jumpered)
LiquidTWI lcd(0x27);

void setup() {
  // set up the LCD's number of rows and columns: 
  lcd.begin(20,4);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

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

  lcd.setBacklight(HIGH);
  delay(500);
  lcd.setBacklight(LOW);
  delay(500);
}

Im not sure how to upload the video here.

I hope I explain well but if I purposly use the wrong I2C address, the screen just stays solid blank, if I use the correct I2C address then it flickers like mad.

Thanks

Which arduino are you using?

What happens if you leave the loop empty?

Have you tried a different library? I would highly recommend hd44780 - Arduino Reference

This works with my LCD.

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

// Set for 1 display with 4 rows of 20 columns
LiquidCrystal_I2C lcd1(0x27,20,4);

void setup() {

  lcd1.init();
  lcd1.backlight();

  lcd1.clear();
  lcd1.setCursor(0,0);
  lcd1.print("LCD 1");
}

void loop() {
}

Thank you, sorted now seems it was a bad library :slight_smile:
New library and it works

...and you can use multiple displays with this library.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.