how to print real time measurements with LCDMenuLib2


I have just started to work with the LCDMenuLib2 and have already built a proper menu for my LCD (20x4). LCDMenuLib2 is a really good framework for menu design and handling but there is one thing I don't understand! How can I print realtime measurements in my menu?
I want to use a "INFO Screen" where parameters like rotating speed, turing direction, layers and position are shown...
To define such a screen is not the problem but how can I show these measurements within the LCDML_display_menuFunctions ?
All of my global variables Global variables are not valid in this context.

For example:
I defined an Interrupt to count the number of windings which will be measured with a hall sensor.
The ISR for this Interrupt also calculates the speed of revolution. Both values are stored in global defined variables. How can I get access to this variables or better, how can I connect these variables with my menuFunctions which are defined in LCDML_display_menuFunctions?

I think I'm standing on the hose right now. ::slight_smile:

Thanks in advance for any help,



solved the problem!

I defined a function like

int LCDML_param1 = 0;
int LCDML_param2 = 0;
float LCDML_param3 = 0.0f;

getMeasurements(int val1, int val2, float val3...)
LCDML_param1 = val1;
LCDML_param2 = val2;
LCDML_param3 = val3;

in the LCDML_display_menuFunction File. In my LOOP-Routine, I call this function time triggerd and transmit the values.

In order to get a permanent refresh of my "Info Screen", I also defined a LOOP-Intervall in the setup part of the menuFunction


Maybe not the right way, but it works fine :slight_smile:

Best regards,