0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« on: January 27, 2013, 02:30:06 pm » |
hi i have a uno v1 with a sensor sheild v4 connected to a ywrobot I2C lcd 16,2 and can't get this simple program to display
#include <Wire.h> #include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x38); // Set the LCD I2C address
#define BACKLIGHT_PIN 13
void setup() {
// Switch on the backlight pinMode ( BACKLIGHT_PIN, OUTPUT ); digitalWrite ( BACKLIGHT_PIN, HIGH ); lcd.begin(16,2); // initialize the lcd
lcd.home (); // go home lcd.print("Hello, ARDUINO "); lcd.setCursor ( 0, 1 ); // go to the next line lcd.print (" WORLD! "); }
void loop() {
}
can anybody see what i am doing wrong?
i also tried a sainsmart 20,4 lcd with no results
devobitch
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #1 on: January 27, 2013, 02:36:29 pm » |
Try this, #include <Wire.h> #include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20,16,2); // set the LCD address to 0x20 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
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #2 on: January 27, 2013, 02:49:48 pm » |
hi
i get a error on this line
LiquidCrystal_I2C lcd(0x20,16,2);
error invalid conversion from 'int' to 't_backlightPoll'
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #3 on: January 27, 2013, 02:59:36 pm » |
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #4 on: January 27, 2013, 03:29:43 pm » |
hi
i get the same error
devobitch
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #5 on: January 27, 2013, 03:32:41 pm » |
Did you delete your LiquidCrystal_I2C library and install the new one? What IDE are you using, 1.0.3, and where did you put it?
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #6 on: January 27, 2013, 03:41:22 pm » |
hi i renamed the old library and put the 2004LiquidCrystal_I2C.rar (unrared) in the library fold and renamed it to LiquidCrystall_I2C
i tried the example in the example folder and got the same error i am useing arduino 1.03 and tried arduino-0023
devobitch
|
|
|
|
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1563
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #7 on: January 27, 2013, 03:49:23 pm » |
Renaming the old folder is not going to solve the problem, you need to get rid of it entirely, move it to your recycling bin.
If needed ill give you my library, but I will need your email address. Send it to me in a personal message.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #8 on: January 27, 2013, 04:03:49 pm » |
hi ok deleted the folders now i get this error compiling In file included from HelloWorld.pde:3: C:\arduino-1.0.3\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)' C:\arduino-1.0.3\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)' heres my email mark_robare@charter.netthanks
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 313
Posts: 35502
Seattle, WA USA
|
 |
« Reply #9 on: January 27, 2013, 04:12:41 pm » |
ok deleted the folders now i get this
error compiling
In file included from HelloWorld.pde:3: C:\arduino-1.0.3\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:81: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)' C:\arduino-1.0.3\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)' You have several issues. First, user downloaded libraries do NOT go in the core library folder. Doing that causes all kinds of issues. The pde extension is for pre-1.0 versions of the IDE. You appear to be using one with post-1.0. Why?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #10 on: January 27, 2013, 04:21:59 pm » |
hi
"You have several issues. First, user downloaded libraries do NOT go in the core library folder. Doing that causes all kinds of issues.
The pde extension is for pre-1.0 versions of the IDE. You appear to be using one with post-1.0. Why?"
ok i read that was where i should put them and i was trying with both 1.03 and 0023 and have same problems so where should LiquidCrystall_I2C go? should i redownload arduino 1.03 and start over?
thanks
devobitch
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 313
Posts: 35502
Seattle, WA USA
|
 |
« Reply #11 on: January 27, 2013, 04:31:28 pm » |
ok i read that was where i should put them Where did you read that? Wherever it was, it is wrong. In the folder where you store your sketches (C:\Users\PaulS\Documents\Arduino in my case) there is a libraries folder. That is where user downloaded libraries go. If there is not a libraries folder, create one. so where should LiquidCrystall_I2C go? See above. should i redownload arduino 1.03 and start over? No. Just delete any user-downloaded libraries you have added to the core library folder.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 15
Arduino rocks
|
 |
« Reply #12 on: January 27, 2013, 04:39:27 pm » |
hi ok i did what you said and used 0023 and it worked thanks know where i can get a 1.03 liquidcrystall_I2C library?
so should i ever put anything in the arduino folder or always use the arduino folder in the documents folder?
thanks again
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 313
Posts: 35502
Seattle, WA USA
|
 |
« Reply #13 on: January 27, 2013, 04:58:16 pm » |
so should i ever put anything in the arduino folder or always use the arduino folder in the documents folder? It's easier to understand and answer this question if you follow the Arduino installation guidelines, and use Arduino as the name of the sketch folder, and arduino-xxxx as the name of the version-specific installation directory for the Arduino code. Then, the question is "so, should I ever put anything in the arduino-xxxx folder...", and the answer is generally no. There are exceptions, as always, but when they arise, you'll know it, you'll know enough to know that it is an exception, and you will be confident enough to do it (and to deal with the situation when you screw things up). For instance, if you are creating a new arduino-ish board, you need to add stuff to the core folder to make that board known to the IDE. Are you likely to do that as a newbie? Not hardly. By the time that you feel that none of the existing Arduino boards exactly fit your needs, you'll know what to add, where, to safely modify the installation. or always use the arduino folder in the documents folder? is almost always a better idea.
|
|
|
|
|
Logged
|
|
|
|
|
|