[ANN] LCDUI : Operator interface with 5-button LCD display

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 ,

Wim

Wim,
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.
Thanks
TomJ

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

Wim

WM'
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,
TomJ

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.

Wim

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

Wim

Wim,
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.
TomJ

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 Frequently Asked Questions).
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 = {
foo,
bar
};

char buf[32];

void setup()
{
Serial.begin(9600);
}

void loop()
{
PGM_P p;
memcpy_P(&p, &array[0], sizeof(PGM_P));
strcpy_P(buf, p);
Serial.println(buf);
memcpy_P(&p, &array[1], sizeof(PGM_P));
strcpy_P(buf, p);
Serial.println(buf);
delay(1000);
}

Wim

Wim,
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.
TomJ