Go Down

Topic: Liquid Crystal lib with IDE 1.5.4 (Read 2885 times) previous topic - next topic

Claus

I tried to test an LCD Keypad Shield from DFRobot with the Liquid Crystal lib and IDE 1.5.4
It seems that
Code: [Select]
LiquidCrystal lcd(8, 9, 4, 5, 6, 7)
does not work.
Any hints whats wrong?

Code: [Select]
//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
}



robtillaart

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

Rob Tillaart

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

arduinodlb

What model is your LCD?

What model is your arduino? (Mega, Uno, Due, etc.)
Do not IM me. I will not respond. Ask questions in the forum.

jack wp

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?
Good luck, Jack

floresta

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

Claus


What model is your LCD?

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


LCD Keypad Shield from DFRobot & Arduino Yún

Claus


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.

Claus


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.

floresta

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

Claus


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

jack wp

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.

Good luck, Jack

Claus


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.

floresta

@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

Claus


@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.

jack wp

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

Go Up