Go Down

Topic: Best LCD Menu Library ? (Read 9863 times) previous topic - next topic

Meditant

Hello,

For you, what is the best menu library for 16x2 LCD, i have a DFRobot LCD shield with buttons and i want to start a project for a programmable UV sensor with alarms. I need to modify some variables with LCD and configures some options.

Best regards,

marco_c

The one I use is my own. I designed it for the same purposes as you want to use it and it is meant for 1 or 2 line displays (like LCD modules).

Find it at https://github.com/MajicDesigns/MD_Menu
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Meditant

#2
Feb 15, 2018, 10:59 pm Last Edit: Feb 15, 2018, 11:05 pm by Meditant
OK thanks it's look nice

fkuashum

I'll bump the post again as I have the same question.
MD_menu may suit but I'd like a native 20x4 screen capability.

MENWIZ.h would have been a a good choice but its now legacy and I can't make it work now with IDE 1.8.5.

Any other tried and trusted options outside those suggested on arduino.cc out there?
Thanks a lot!

AlbertoNeves

Hi, did you see that one?

https://github.com/VaSe7u/LiquidMenu

------------------------------------------------------------------------------

quote author=fkuashum link=msg=3852474 date=1535266253]
I'll bump the post again as I have the same question.
MD_menu may suit but I'd like a native 20x4 screen capability.

MENWIZ.h would have been a a good choice but its now legacy and I can't make it work now with IDE 1.8.5.

Any other tried and trusted options outside those suggested on arduino.cc out there?
Thanks a lot!
[/quote]

davetcc

I don't like bumping old threads but this is not that old.

I've got a menu library that is currently going through active development. I've not yet really exposed it much to the outside world as it is quite new. Think Early BETA.

It's able to render to most lcd screen sizes including i2c and also adafruit GFX compatible displays. I'm also planning to write an oled 1306 renderer. Writing a new renderer is quite straightforward.

It provides support for input from a rotary encoder or switches. Attached either directly or on an IOexpander.

It includes a designer app that works on most desktop platforms that generates the menu code and can round trip.

It's main standout feature is remote control. It has Ethernet and Serial based endpoints with a Java API client side and fully documented protocol for other languages. There is an example javaFX client that demonstrates the remote capabilities. Writing new remote endpoints is straightforward. It works on anything from Uno upwards.

Tested on Uno, Mega and Mkr ranges.

https://github.com/davetcc/tcMenu
Long time Arduino user who enjoys DIY audio and AV equipment.

bradleyb

I don't like bumping old threads but this is not that old.

I've got a menu library that is currently going through active development. I've not yet really exposed it much to the outside world as it is quite new. Think Early BETA.

It's able to render to most lcd screen sizes including i2c and also adafruit GFX compatible displays. I'm also planning to write an oled 1306 renderer. Writing a new renderer is quite straightforward.

It provides support for input from a rotary encoder or switches. Attached either directly or on an IOexpander.

It includes a designer app that works on most desktop platforms that generates the menu code and can round trip.

It's main standout feature is remote control. It has Ethernet and Serial based endpoints with a Java API client side and fully documented protocol for other languages. There is an example javaFX client that demonstrates the remote capabilities. Writing new remote endpoints is straightforward. It works on anything from Uno upwards.

Tested on Uno, Mega and Mkr ranges.

https://github.com/davetcc/tcMenu
I tried this out and it's really promising!

I had trouble getting it to work with my i2c lcd backpack. so I did my own renderer using the hd44780 library. Is there a way to get it to leave my renderer in place when regenerating menu code?

davetcc

#7
Jan 22, 2019, 08:03 am Last Edit: Jan 22, 2019, 08:05 am by davetcc
Quote
I had trouble getting it to work with my i2c lcd backpack. so I did my own renderer using the hd44780 library. Is there a way to get it to leave my renderer in place when regenerating menu code?
Thanks for trying TcMenu. This is planned for a version very soon. In fact could probably be put in 1.1 due this week.

Also if you'd consider contributing back I would be glad to help you putting into the new structure and making it another option.
Long time Arduino user who enjoys DIY audio and AV equipment.

bradleyb

Thanks for trying TcMenu. This is planned for a version very soon. In fact could probably be put in 1.1 due this week.

Also if you'd consider contributing back I would be glad to help you putting into the new structure and making it another option.
Well, "my own renderer" was actually no more than changing the #includes in tcMenuLiquidCrystal.h and adjusting the lcd() constructor in MyProject.cpp.

And then I realized the generated code did work, just with no backlight. Saw your updates today, and that's working as well. Thanks!

It took me a while to figure out some other stuff, like eeprom load/save. An example project would come in really handy.

davetcc

Yep, examples were missing from v1.0. There has been a quite long delay between versions because of a few tooling changes. This is all but sorted now. New release within the next few days.

When the next version comes out it will have a couple of long overdue examples too. Along with that I have a few starter videos and updates to the quick start planned.
Long time Arduino user who enjoys DIY audio and AV equipment.

bradleyb

Great news. I'll second the request for acceleration I saw in another thread. My plan is to use this for a stepper controller, and being able to use one of those analog menu items, through its full 64K range would be really valuable.

davetcc

#11
Jan 23, 2019, 10:52 am Last Edit: Jan 23, 2019, 11:00 am by davetcc
Yep acceleration has been asked for a few times now. created an issue against ioabstraction: https://github.com/davetcc/IoAbstraction/issues/37
Long time Arduino user who enjoys DIY audio and AV equipment.

davetcc

Just today V1.1 of TcMenu has been released. It has quite a few improvements, including shipping with three examples ready built for common configurations.

I'm going to put some time into improving the examples, videos, and documentation as I think these are most important at the moment. There's now a lot of people trying to use it, and the documentation in some areas is either old or thin on the ground.

After that I'll look at acceleration for both rotary encoders and switches (switchinput) as that's getting quite a lot of requests now.
Long time Arduino user who enjoys DIY audio and AV equipment.

neu-rah

#13
Feb 02, 2019, 05:43 pm Last Edit: Feb 02, 2019, 05:44 pm by neu-rah
Hi!

Here an alternative https://github.com/neu-rah/ArduinoMenu

see for yourself, the supported platforms and display's is huge, active maintained, usage hardened library.

Provides a useful set of controls and plugins


tamitche

I just wrote my own for my wheelieometer, basically in Setup if the button is held down it goes into a setup mode and prompts the user to release the button.  It then prompts for each parameter in turn; for each pressing the button increments the value by one (there is a debounce, so holding the button increments the value slowly), the value reverts to its minimum if the maximum is exceeded.  If the button isn't pressed for a specified period, the value is accepted and the user is prompted for the next value.

Example (could do with using more generic functions!):

if (!digitalRead(PinDisplayButton)) //Read button directly as we don't need debounce
  {
    //Button Pressed, enter setup mode
    oled.print(F("Setup Mode"));
    oled.clearToEOL();
    oled.setCursor(0,4);
    oled.print(F("Release"));
    oled.clearToEOL();
    oled.setCursor(0,6);
    oled.print(F("Button!"));
    oled.clearToEOL();

    //Wait for button to be released
    do
    {
    } while (!digitalRead(PinDisplayButton));
    OldDisplayButtonTime = millis(); //Reset time of last button press
   
    if(ClockAvailable)
    {
      byte RTCDataMax[6]; //Array to hold maximum value of each element of the date and time
      RTCDataMax[0] = 59; //Maximum seconds
      RTCDataMax[1] = 59; //Maximum minute
      RTCDataMax[2] = 23; //Maximum hour
      RTCDataMax[3] = 31; //Maximum date (no check made for shorter months)
      RTCDataMax[4] = 12; //Maximum month
      RTCDataMax[5] = 99; //Maximum year
 
      byte RTCDataMin[6]; //Array to hold minimum value of each element of the date and time
      RTCDataMin[0] = 0; //Minimum seconds
      RTCDataMin[1] = 0; //Minimum minute
      RTCDataMin[2] = 0; //Minimum hour
      RTCDataMin[3] = 1; //Minimum date
      RTCDataMin[4] = 1; //Minimum month
      RTCDataMin[5] = 0; //Minimum year
     
      byte RtcData[6]; //Array to save clock values
     
      //Print fixed text to screen
      oled.setCursor(0,2);
      oled.print(F("Set Clock"));
      oled.clearToEOL();
      oled.setCursor(0,4);
      oled.print(F("Set"));
      oled.clearToEOL();
      oled.setCursor(0,6);
      oled.clearToEOL();     

      //Retrieve current time
      HCRTC.RTCRead(I2CDS1307Add);
      RtcData[0] = HCRTC.GetSecond(); //Seconds
      RtcData[1] = HCRTC.GetMinute(); //Minutes
      RtcData[2] = HCRTC.GetHour(); //Hours
      RtcData[3] = HCRTC.GetDay(); //Date
      RtcData[4] = HCRTC.GetMonth(); //Month
      RtcData[5] = HCRTC.GetYear(); //Year
     
      //Loop over elements of date and time
      for (byte ClockElement = 5;  ClockElement < 6; ClockElement--) //After 0 value will overload to 255 hence the end condition
      {
        //State what is being set
        oled.setCursor(49,4); //Position to write
        switch (ClockElement)
        {
          case 5:
            oled.print(F("Year"));
            break;
          case 4:
            oled.print(F("Month"));
            break;
          case 3:
            oled.print(F("Date"));
            break;
          case 2:
            oled.print(F("Hour"));
            break;
          case 1:
            oled.print(F("Minute"));
            break;     
          case 0:
            oled.print(F("Second"));
            break;                           
        }
        oled.clearToEOL();
 
        //Print current value to screen
        oled.setCursor(0,6);
        oled.print(RtcData[ClockElement]);
        oled.clearToEOL();
 
        //Wait for button presses to change value
        do
        {
          if (CheckDisplayButton())
          {
            //Button pressed: increment value
            RtcData[ClockElement]++;
            if(RtcData[ClockElement] > RTCDataMax[ClockElement]) //Jump to minimum value
            {
              RtcData[ClockElement] = RTCDataMin[ClockElement];
            }
            //Update display
            oled.setCursor(0,6);
            oled.print(RtcData[ClockElement]);
            oled.clearToEOL();
          }
         } while (!IntervalCheck(OldDisplayButtonTime, SetupTimeout)); //After timeout, proceed
        OldDisplayButtonTime = millis(); //Reset timeout for next element
      }
     
      HCRTC.RTCWrite(I2CDS1307Add, RtcData[5], RtcData[4], RtcData[3], RtcData[2], RtcData[1], RtcData[0], 1);  //Set Clock, last parameter is weekday and not used
      delay(100); //Delay to let the clock be set
    }

    //Minimum angle to trigger a wheelie
    oled.setCursor(0,2);
    oled.print(F("Set Angle"));
    oled.clearToEOL();
    oled.setCursor(0,4);
    oled.print(F("Threshold"));
    oled.clearToEOL();

    //Read current angle from non-volatile EEPROM memory
    MinAngle = EEPROM.read(MinAngleEEPROMAddress);

    //Check MinAngle in range, if not default to smallest
    if((MinAngle < MinAngleMin) || (MinAngle > MinAngleMax))
    {
      MinAngle = MinAngleMin;
    }

    //Write current value to screen
    oled.setCursor(0,6);
    oled.clearToEOL();
    oled.setCursor(25,6);
    oled.set1X();
    oled.print(F("o"));
    oled.set2X();
    oled.setCursor(0,6);
    oled.print(MinAngle,0);

    //Wait for button presses to change value
    do
    {
      if (CheckDisplayButton())
      {
        //Button pressed: increment value by 5 degrees
        MinAngle += 5;
        if(MinAngle > MinAngleMax) //Jump to minimum value
        {
          MinAngle = MinAngleMin;
        }
        //Update display
        oled.setCursor(0,6);
        oled.print(F("  "));
        oled.setCursor(0,6);
        oled.print(MinAngle,0);
      }
    } while (!IntervalCheck(OldDisplayButtonTime, SetupTimeout)); //After timeout, proceed
    OldDisplayButtonTime = millis(); //Reset timeout for next element

    EEPROM.update(MinAngleEEPROMAddress, (int)MinAngle); //Update stored value

Go Up