Liquid Crystal lib with IDE 1.5.4

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

floresta:

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.

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

floresta:

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 :frowning:
Downloading the code works because I started with a blinking LED and thsi works.

Claus

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.

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.

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

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

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.

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.

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

USB
4.3 V on pin 5V (yesterday I had 3.3 V there, I do not know why this is changed)
3.3 V on pin 3V3

LCD does not work
I will try an I2C sensor this evening

You have a problem with power, if you are reading 4.3 volts where the 5 volts should be.

  1. Can you try a different USB power source, and/or cable ?
  2. Do you have other loads on the arduino that may be drawing down on the 5V line?
  3. If you plug in your other arduino board to that USB, what voltage does it read?

I use a 5 V DC power supply connected to VIN now and got stable conditions on the shield.
The LCD Keypad shield does not work again.

Therefore I was going one step back and used a RTC DS1307 on Aduino 2009 & IDE V1.0.5. This works properly.
The files you can download from Arduino Quelltexte - Browse /IDE_V1.0.5_and_higher at SourceForge.net.

The same shield connected to Arduino Yún with the same RTClib gave me the error "RTC_DS1307 does not name a type".
This is not clear for me. Do you have any idea where the differences are? Di you need further information?

Claus

I am having a hard time keeping up.
First there was a LCD problem with IDE 1.5.4
Then the LCD works on another arduino board.
Then your arduino had only 3.3 volts on the 5 volt pin.
Now you get Compile errors when you use a RTC shield.

Lets slow down. The last thing I mentioned was that you had a problem with your power supply ( 5v). Have you got that fixed yet.
You replied

I use a 5 V DC power supply connected to VIN now and got stable conditions on the shield.

. I don't really know what that means. Do you read 5.1 Volts on the 5volt pin now?

I don not have a Yun.
Is this diagram correct for the Yun (eg, D7 is now handshake)?
http://forum.arduino.cc/index.php/topic,189755.0.html
There is no D7 or D8 etc. anymore?

I am sorry for the hard time :wink:
The Yun is new for me and has some changes.
Your hint to the rigth power supply was very good and helped to get clear conditions on the shield. I have 4.6 V on pin 5V due to the voltage drop over D2. This is ok for me.

Now I have two problems furthermore:

  1. The LCD Keypad shield - may be more complex
  2. Therefore I was going one step back and tried a simple I2C sensor DS1307. This work on Arduino 2009 & IDE 1.0.5 but not with Yun & IDE 1.5.4.

I saw the changed pinout of the Yun. This is one issue I have not realized (:-)) and I think with the correct pins this will be ok. Sorry for that.
Not clear is the compiler error described.
Claus

Claus,
I don't understand the compile error either. I assume you did set the board type in the IDE.
Are you loading the sketch through the usb, or wifi?
Maybe someone else here has an idea about the compile error.

I found the LeoShield which should help to contact "old" shields to Arduino Leonardo & Yún. Do you know this?

I did not know about the need for the "LeoShield".
I checked and found this info

You will need the LeoShield if the shield you are considering uses any of the following pins which are from the older style IO pin mapping.

D11 (SPI)MOSI
D12 (SPI)MISO
D13 (SPI)SCK
A4 (I2C)SDA
A5 (I2C)SCL

I don't think your lcd shield use any of these.
I have a leonardo, and run a lcd shield on it with no problems.
BTW, what did you have to do to get your voltage up ?

For the LCD I do not need it. But, I have some other shields yet.
For my LCD Keypad I have to look for the right pinning, I believe.
The power is ok since I use an external power source of 5 V to VIN.