Pages: [1]   Go Down
Author Topic: problem lcd i2c and arduino uno  (Read 1607 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
  lcd.print(millis()/1000);

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 73
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


//DFRobot.com
#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.backlight();
  lcd.print("Hello, world!");
}

void loop()
{
}
Logged

WV
Offline Offline
Full Member
***
Karma: 0
Posts: 160
Arduino, Helps With the ADD
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you found and Downloaded the LiquidCrystal_I2C.h Library ?
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The code contains a link to a complete URL:
http://www.ladyada.net/products/i2cspilcdbackpack/index.html


Read the very last section that says "Arduino Library".  Directions are there on how to download the required library and how to install it.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Pages: [1]   Go Up
Jump to: