i2c / SPI character LCD backpack ID: 292

by kenkubick on Thu Feb 09, 2012 11:21 am

I recently baught the i2c / SPI character LCD backpack. I can't get the sample sketch to compile. I keep getting errors. The main error is.

no matching function for call to 'LiquidCrystal(int)'

/*
Demonstration sketch for Adafruit i2c/SPI LCD backpack
using MCP23008 I2C expander
( http://www.ladyada.net/products/i2cspil ... 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);
}
kenkubick
 
Posts: 2
Joined: Thu Feb 09, 2012 10:25 am

Re: i2c / SPI character LCD backpack ID: 292

by adafruit_support_bill on Thu Feb 09, 2012 11:24 am

Are you using the Adafruit version of the Liquid Crystal Library? http://www.ladyada.net/products/i2cspilcdbackpack/#download
User avatar
adafruit_support_bill
 
Posts: 25404
Joined: Sat Feb 07, 2009 9:11 am

Re: i2c / SPI character LCD backpack ID: 292

by kenkubick on Fri Feb 10, 2012 4:37 am

I got the sketch to compile but I got a message at the botom of the screen. It says avrdude: stk500_getsync(): not in sync: resp=0x30 I don't know what this means. When I try the display with the i2c character LCD backpack. I get nothing on the display.

Thankyou

Ken Kubick
kenkubick
 
Posts: 2
Joined: Thu Feb 09, 2012 10:25 am

Re: i2c / SPI character LCD backpack ID: 292

by adafruit_support_bill on Fri Feb 10, 2012 6:20 am

It says avrdude: stk500_getsync(): not in sync: resp=0x30

Make sure that you have the right board type selected in the Tools menu.
ALso make sure that you have the right COM port selected.
User avatar
adafruit_support_bill
 
Posts: 25404
Joined: Sat Feb 07, 2009 9:11 am