Go Down

Topic: problem lcd i2c and arduino uno (Read 3257 times) previous topic - next topic


i don't understand because this code not work with my arduino uno and a dfrobot LCD1602 I2C/TWI module. when i click on verify out the message: no matching function for call to 'LiquidCrystal::LiquidCrystal(int)

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 "LiquidCrystal.h"

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

void setup() {
  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);
  // 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(0, 1);
  // print the number of seconds since reset:



also this code not work. when i click verify out message: 'LiquidCrystal_I2C' does not name a type

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

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
  lcd.init();                      // initialize the lcd

  // Print a message to the LCD.
  lcd.print("Hello, world!");

void loop()


Have you found and Downloaded the LiquidCrystal_I2C.h Library ?


The code contains a link to a complete URL:

Read the very last section that says "Arduino Library".  Directions are there on how to download the required library and how to install it.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up