Go Down

Topic: [ANN] LCDUI : Operator interface with 5-button LCD display (Read 2320 times) previous topic - next topic


A new library to handle "stand alone" a complete user interface with menu's, input/output fields, navigation, editing (with input validation e.g. a date entry for February 2012 has 29 days, 2013 has 28 days, seconds limited to 59,...). Also alarm clock functionality is built in.
Developed for 2 x 16 chars (configurable) LCD with 5 push buttons.
Examples are provided, as is a test suite (uses ArduinoUnit).

Download at -> http://users.skynet.be/adrias/Arduino/index.html <-

Comments welcome ,



Got the library installed, installed ArduinUnit library, still can't get any examples to compile.
Errors abound

In file included from C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdEdit.h:38,
                 from C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdFields.h:38,
                 from C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdMenu.h:38,
                 from C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdMenus.h:38,
                 from C:\Users\Tom\Documents\Arduino\libraries\LcdUi/LcdUi.h:36,
                 from lcdui.ino:32:
C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdString.h:44: error: expected ',' or '...' before numeric constant
C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdString.h:46: error: expected ',' or '...' before numeric constant
C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdString.h:48: error: expected ',' or '...' before numeric constant
C:\Users\Tom\Documents\Arduino\libraries\LcdUi/utility/LcdString.h:50: error: expected ',' or '...' before numeric constant

I get the same errors in every example, plus more in most that could be caused by these.
Any solutions?  I am afraid to mess with the library on my own, just starting to understand them a little bit.
Sorry about the cut and paste, I can't figure out how to include the formating for errors.

Einstein once said you don't really understand anything until you can explain it to your Grandmother


Hmm, it works here.

The common factor in the errormessages is the definition "PGM_P".

Now I'm neither an expert nor a long time user of Arduino, but it's only recently that this definition is included in <arduino.h> (in LcdUi.h).

So :
- do you have a recent version (> 1.0) of Arduino installed ?
- did you install the library as per the instructions on http://arduino.cc/en/Guide/Libraries ?
- does the library and the examples show up in Arduino (menu : File > examples) ?

Hope this helps, if not please post the answers to above questions



Woke up in the night thinking I should have included that info:

Arduino 1.0.3 and 1.0.1 tried

Both libraries installed in the sketchbook/ libraries folder  (that way easily updated between versions)

Both show up in Arduino, color from keyword files are correct, examples show up, and in "import library"

I ran the sample test program for ArduioUnit.h on their webpage and it worked fine.

arduino.h is in lots of places, but most importantly in Arduino1.0.3/hardware/arduino/cores/arduino/arduino.h

Probably some small thing, but would really like this library to work with keypad/lcds.
Thanks for your time,
Einstein once said you don't really understand anything until you can explain it to your Grandmother


OK, I did something stupid...  I changed the name of the library zip-file from LcdUi to LCDUI...  Depending of the platform you are on this might give problems ? Can you check if the library is in "LcdUi" (as it should be) ?
To be entirely honest I already tried playing with the case on my PC (MacBook Pro) and for me they all seem to work, but who knows.


ps.: I'm going to try to reinstall Arduino and follow the same procedure to install the library, see what happens (that'll be tonight...)


I have been playing with settings, removing Arduino, reinstalling, unzipping the library file,...  Everything works every time.
I hope you are using the Arduino Uno ?  The Due is not compatible...



Yep, using a Uno, thought maybe my download was corrupt, tried to re-download following your links again and the file couldn't be found. Tried a different extraction tool on the old .zip, it didn't help either.
I will keep trying the download tomorrow.
Einstein once said you don't really understand anything until you can explain it to your Grandmother


OK, the download should be available again.

On the forum is a thread "h:16: error: expected ',' or '...' before numeric" which might indicate that PGM_P or DATA has been redefined somewhere ?

Further : since the problem seems to be with PGM_P, you might try below code (adapted from an example in http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_rom_array).
Should work with the <arduino.h> include as well as with the <avr/pgmspace.h>

//#include <avr/pgmspace.h>
#include <arduino.h>

const char foo[] PROGMEM = "Foo";
const char bar[] PROGMEM = "Bar";

PGM_P array[2] PROGMEM = {

char buf[32];

void setup()          

void loop()          
    PGM_P p;
    memcpy_P(&p, &array[0], sizeof(PGM_P));
    strcpy_P(buf, p);
    memcpy_P(&p, &array[1], sizeof(PGM_P));
    strcpy_P(buf, p);



Well I downloaded the library again, downloaded and reinstalled Arduino 1.0.3 again, downloaded and ran the little test program from the last post, it worked fine. Having "foo bar" print over and over took me back  30+ years, but it did work both ways, 'course we spelled it FUBAR. Which seems to be the way this is going to go for me.
I'll quit bugging you now, thanks again for your time.
Einstein once said you don't really understand anything until you can explain it to your Grandmother

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131