Pages: [1] 2   Go Down
Author Topic: Liquid Crystal lib with IDE 1.5.4  (Read 2425 times)
0 Members and 1 Guest are viewing this topic.
Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried to test an LCD Keypad Shield from DFRobot with the Liquid Crystal lib and IDE 1.5.4
It seems that
Code:
LiquidCrystal lcd(8, 9, 4, 5, 6, 7)

does not work.
Any hints whats wrong?

Code:
//Sample using LiquidCrystal library
#include <LiquidCrystal.h>
 
/*******************************************************
This program will test the LCD panel
Mark Bramwell, July 2010
********************************************************/
 
// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
 
void setup()
{
 lcd.begin(16, 2);              // start the library
 lcd.setCursor(0,0);
 lcd.print("Hello World"); // print a simple message
}
 
void loop()
{
 lcd.setCursor(9,1);            // move cursor to second line "1" and 9 spaces over
 lcd.print(millis()/1000);      // display seconds elapsed since power-up
}

Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you also tried it with another IDE?
just to check if your LCD is working or that it is the LCD lib?

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Sr. Member
****
Karma: 12
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What model is your LCD?

What model is your arduino? (Mega, Uno, Due, etc.)
Logged

Do not IM me. I will not respond. Ask questions in the forum.

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are many LCD libraries, and they are not all created equal.
Also not all LCD boards are the same.

What LCD are you using (URL please), and which library (URL please).
Did the documentation for that LCD say which library to use. Did it give you test script to use?
Logged

Good luck, Jack

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any hints whats wrong?
How about a hint about what you mean by "does not work"

Unless they have changed their PC board those are the correct parameters for lcd.begin().  The sketch is also fairly standard except for the extra (and unneeded) lcd.setCursor step in setup().

Are you using an Arduino Yun or Due?  
  If not then why are you using 'beta' software?
  If you are then did you check to see if the shield is compatible?

Did you see this on the Arduino download page?

WARNING: The early Windows release 1.5.4 contained a bug that prevents it from working correctly on Windows 8. 1.5.4r2 fixes the issue.

Of course they didn't specify how the bug manifests itself.

Don
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What model is your LCD?

What model is your arduino? (Mega, Uno, Due, etc.)

LCD Keypad Shield from DFRobot & Arduino Yún
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There are many LCD libraries, and they are not all created equal.
Also not all LCD boards are the same.

What LCD are you using (URL please), and which library (URL please).
Did the documentation for that LCD say which library to use. Did it give you test script to use?


I followed the hint on DFRobot site and used the Lib included in the IDE 1.5.4 with changed pinning for the shield.
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any hints whats wrong?
How about a hint about what you mean by "does not work"

Unless they have changed their PC board those are the correct parameters for lcd.begin().  The sketch is also fairly standard except for the extra (and unneeded) lcd.setCursor step in setup().

Are you using an Arduino Yun or Due?  
  If not then why are you using 'beta' software?
  If you are then did you check to see if the shield is compatible?

Did you see this on the Arduino download page?

WARNING: The early Windows release 1.5.4 contained a bug that prevents it from working correctly on Windows 8. 1.5.4r2 fixes the issue.

Of course they didn't specify how the bug manifests itself.

Don

I use Arduino Yún and a W7 PC.
Because I see only one block line in the LCD (playing with the contrast) there must be an initilization issue.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I use Arduino Yún and a W7 PC.
Because I see only one block line in the LCD (playing with the contrast) there must be an initilization issue.
You are correct about the initialization issue.

Here is what is not wrong!
- You are using a shield that plugs directly into your Arduino so the wiring should not be a problem.
- You are using an established library that has worked for others with this shield and traditional Arduinos.
- You are using the correct parameters with your LiquidCrystal lcd constructor.

A few possibilities come to mind:
- The shield could be defective. 
- The shield could be incompatible with the Yún. 
- You could be having trouble downloading your code to the Yún.

How much experience do you have with your Yún?  Have you been able to successfully download and run other programs that do not involve this shield?


Don
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I use Arduino Yún and a W7 PC.
Because I see only one block line in the LCD (playing with the contrast) there must be an initilization issue.
You are correct about the initialization issue.

...

A few possibilities come to mind:
- The shield could be defective. 
- The shield could be incompatible with the Yún. 
- You could be having trouble downloading your code to the Yún.

How much experience do you have with your Yún?  Have you been able to successfully download and run other programs that do not involve this shield?


Don
The shield works properly on Arduino 2009 with IDE 1.0.5.
Incompatibility to Yun could be because I was not able until now to bring 5V DC to the 5V pin. Its always 3.3 V and I did not finde JP3 :-(
Downloading the code works because I started with a blinking LED and thsi works.

Claus
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The shield works properly on Arduino 2009 with IDE 1.0.5.
Wow, good to hear that. If you had mentioned that earlier, It would have saved us lots of time.

Quote
I was not able until now to bring 5V DC to the 5V pin. Its always 3.3 V
Another bit of information you failed to share with us.

Great, you probably have solved the mystery.

Logged

Good luck, Jack

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The shield works properly on Arduino 2009 with IDE 1.0.5.
Wow, good to hear that. If you had mentioned that earlier, It would have saved us lots of time.

Quote
I was not able until now to bring 5V DC to the 5V pin. Its always 3.3 V
Another bit of information you failed to share with us.

Great, you probably have solved the mystery.


But, how can I handle the voltage problem.
In the documentation I can read that it is possible by JP3 to select 5V or 3.3 V for the shields.
I did not found JP3 until now and have on 3V3 the same voltage as on 5V.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4257
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Claus
It would be a good idea for you to go back to your Arduino profile and enter your location.

One problem we are having is in interpreting what you are saying.  Your English is very good but just not the same as what some of us are used to.

Here is an example relating to the phrase "until now" as used here:
"I was not able until now to bring 5V DC to the 5V pin."

In American English this would be interpreted as:
   Up until this point in time I was not able to bring 5V DC to the 5V pin but now I can.

In other varieties of English (including yours I think) this means:
   At this point in time I am still not able to bring 5V DC to the 5V pin.



Quote
In the documentation I can read that it is possible by JP3 to select 5V or 3.3 V for the shields.

Please provide a link to that documentation

Don
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 29
Arduin Yún - Arduino for the cloud
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Claus
It would be a good idea for you to go back to your Arduino profile and enter your location.

One problem we are having is in interpreting what you are saying.  Your English is very good but just not the same as what some of us are used to.

Here is an example relating to the phrase "until now" as used here:
"I was not able until now to bring 5V DC to the 5V pin."

In American English this would be interpreted as:
   Up until this point in time I was not able to bring 5V DC to the 5V pin but now I can.

In other varieties of English (including yours I think) this means:
   At this point in time I am still not able to bring 5V DC to the 5V pin.



Quote
In the documentation I can read that it is possible by JP3 to select 5V or 3.3 V for the shields.

Please provide a link to that documentation

Don
@Don

Profile is changed.
I understand the difference. I have only 3.3 V on the shield and no idea how to get 5 V there.

http://arduino.cc/en/Main/ArduinoBoardYun at Summary you will find:

AVR Arduino microcontroller
Microcontroller   ATmega32u4
Operating Voltage   5V
Input Voltage   5V

and

http://arduino.cc/en/uploads/Main/arduino-Yun-schematic.pdf mentions "JP3(3.3V/5V) for Shield Application". But, I did not find JP3 in the schematics.
Logged

Texas
Offline Offline
Edison Member
*
Karma: 25
Posts: 1298
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What power supply are you using to power your arduino? Is it USB, or what?
You tested the voltage with a volt meter ?
Logged

Good luck, Jack

Pages: [1] 2   Go Up
Jump to: