Welcome, Guest

Author Topic: Shield LCD16x2 with Arduino Uno  (Read 3648 times)

franknh

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Shield LCD16x2 with Arduino Uno
« on: June 22, 2016, 07:29:39 PM »
I purchased an Olimex Shield LCD16x2 unit with 16x2 LCD and 4 buttons for use with Arduino.
I downloaded the example programs and the LCD16x2 library from the website.
I plug the shield LCD board on to the Arduino Uno, load an example program (Buttons_And_LCD), but it does not compile correctly.  It is giving errors as if it cannot find the wire.h library.  I did see that the wire.h library is located in a different directories than the majority of the libraries used with Arduino.
None of the example programs can compile properly.  They all give a similar error message.  I even selected the Arduino Duemilanova w/ATmega328 board in the IDE like the readme.txt file said to do.
This made no difference and I still get the same error message.

I loaded another example program supplied with the Arduino IDE (digital potentiometer) that uses the same wire.h library and it compiled just fine and I was able to upload it to the board.
Can someone give me some tips as to what might be wrong??  I really would like to use the LCD with 4 buttons in my project.  I have the plain LCD16x2 with buttons separate, but like the 4 buttons built in on the Olimex shield because it is low cost and compact.

Thanks   :(       
Frank Medros


LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1819
  • Karma: +46/-2
Re: Shield LCD16x2 with Arduino Uno
« Reply #1 on: June 23, 2016, 09:10:07 AM »
Hey,

Did you copy the whole folder "LCD16x2" to the libraries folder of your Arduino IDE (ex. "..\arduino-x.x.x\libraries")?

What us the Arduino IDE version that you use?

Did you download the Arduino IDE from arudino.cc or from arudino.org?

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

franknh

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Shield LCD16x2 with Arduino Uno
« Reply #2 on: June 23, 2016, 03:35:00 PM »
I did copy the whole LCD16x2 folder to the arduino\library folder.
I was using arduino IDE version 1.6.8 and recently updated to 1.6.9 and had downloaded both from arduino.cc.
I didn't know there was arduino.org.

So just today I downloaded the even more updated arduino IDE 1.7.10 from arduino.org and after much fighting with the computer, and going back and forth with COM ports, etc to make sure the IDE was communicating properly with the board, I was finally able to load the example program Buttons_and_LCD and successfully compiled it and uploaded to the board and it is operating correctly.

Thanks for the quick reply and pointing me to the arduino.org site.
I am happy that it is finally working and now I can try writing some code for the shield to use in my project.  I may now purchase more units to work with.

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1819
  • Karma: +46/-2
Re: Shield LCD16x2 with Arduino Uno
« Reply #3 on: June 24, 2016, 02:05:39 PM »
Glad you got it solved. However, this is very interesting since we used the Arduino IDE from arduino.cc to make the project. I thought you attempted to use the Arduino IDE from arduino.org... Makes me think if it is possible that Arduino guys started to detect hardware manufactured from the opposing front and block communication...

Anyway, glad it is working.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

NewtoC

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Shield LCD16x2 with Arduino Uno
« Reply #4 on: December 10, 2017, 11:36:30 AM »
I have the same problems when compiling. I use the IDE version 1.8.5 and have also tried the beta version 1.9. I have even tried different boards, Uno, Nano and Pro Mini.

The LCD16x2 file is placed under Arduino-1.8.5/libraries.

I always receive the followíng text when compiling:


:\Program Files (x86)\Arduino\libraries\LCD16x2\LCD16x2.cpp:24:26: fatal error: ../Wire/Wire.h: No such file or directory

 #include "../Wire/Wire.h"

                          ^

compilation terminated.

exit status 1
Error compiling for board Arduino Pro or Pro Mini.

Being absolutely no expert I am probably doing something wrong but what ?

Regards,

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1819
  • Karma: +46/-2
Re: Shield LCD16x2 with Arduino Uno
« Reply #5 on: December 11, 2017, 07:27:20 AM »
Hey,

Probably something with the include location or syntax between Arduino revisions. Try opening the .cpp file inside the library and change #include <../Wire/Wire.h> to #include <Wire.h>.

If the problem persists you might also try starting the example following this guide: https://www.olimex.com/Products/Duino/_resources/Arduino_instructions.pdf - just make sure to select OLIMEXINO-328 instead of Arduino UNO in the board's manager, else the LCD demo wouldn't be selectable/visible.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

NewtoC

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Shield LCD16x2 with Arduino Uno
« Reply #6 on: December 12, 2017, 01:03:39 PM »
Lub,
Thanks a lot for the quick reply and help !

Now compiling and uploading works.
However, it was not possible to change with the .cpp file inside the library. Instead I put a copy of it in another file, made the change and then reloaded it into the library.

Best regards,
Urban