Display variable #67
-
I'm trying to make a system for my brother, and i need a display to control everything. I've tried this : with an ItemInput i tried menu[1][2][1].value = "1"; in the loop function The strange thing is that the text displays, but then immediately after, the esp32 crashes. This is my code: #include <AiEsp32RotaryEncoder.h> // setting up connection pins // input sensors //output valves // Declare the call back function extern MenuItem mainMenu[]; MenuItem mainMenu[] = {ItemHeader(),
/**
LcdMenu menu(LCD_ROWS, LCD_COLS); void IRAM_ATTR readEncoderISR() void readRotaryEncoder() if (value > last) { void setup()
} void loop()
} /**
void goBack(){ void TDS1CALLBACK(String TDS1Value){ } |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 20 replies
-
This is the error that i'm getting Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: Backtrace:0x400d3438:0x3ffb27a00x400d3485:0x3ffb27c0 0x400d360a:0x3ffb27e0 0x400d1ef9:0x3ffb2800 0x400d36ed:0x3ffb2820 |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick reply. I can't get it to work though.
I have this menu item
// Define the main menu
MAIN_MENU(
ITEM_BASIC("OSMOSESYSTEM"),
ITEM_INPUT("TDS1:",inputCallback),
);
LcdMenu menu(LCD_ROWS, LCD_COLS);
in the loop I do this
char buffer[12];
menu[1]->value = sprintf(buffer,"TDS1: %.2f",TDS_Inlet);
i get this error 'class MenuItem' has no member named 'value'
I'm clearly doing something wrong, but it don't know what it is.
Verzonden vanuit Outlook<http://aka.ms/weboutlook>
…________________________________
Van: Thomas Forntoh ***@***.***>
Verzonden: woensdag 9 augustus 2023 14:07
Aan: forntoh/LcdMenu ***@***.***>
CC: Wim Grymonprez ***@***.***>; Author ***@***.***>
Onderwerp: Re: [forntoh/LcdMenu] Display variable (Discussion #67)
This discussion might help you
#9 (comment)<#9 (comment)>
—
Reply to this email directly, view it on GitHub<#67 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUKNJ6L3KCJES2EL46QQ2SLXUN4QLANCNFSM6AAAAAAT35F6HA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Brilliant, it works. I noticed I could have found this in the src directory. I'll do this first should i encounter another issue. Thank you very much for your help.
Verzonden vanuit Outlook<http://aka.ms/weboutlook>
…________________________________
Van: Thomas Forntoh ***@***.***>
Verzonden: woensdag 9 augustus 2023 16:10
Aan: forntoh/LcdMenu ***@***.***>
CC: Wim Grymonprez ***@***.***>; Author ***@***.***>
Onderwerp: Re: [forntoh/LcdMenu] Display variable (Discussion #67)
menu[1]->setValue("AAAAAA")
value is private, you have to use the setter.
—
Reply to this email directly, view it on GitHub<#67 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUKNJ6MUGFLGKAKMDG7M523XUOK33ANCNFSM6AAAAAAT35F6HA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Dear Forntoh,
I'm sorry to contact you again. I thought the menu worked, but when i got back from work i uploaded it to my esp32 and although it doesn't show an error, the value isn't being updated on the screen.
Here is the relevant code
MAIN_MENU(
ITEM_BASIC("OSMOSERINATOR"),
ITEM_INPUT("TDS1:",inputCallback),
ITEM_SUBMENU("Control", onOffAuto)
);
In the loop I send these commands to the lcd
menu[1]->setValue("TDS1: testtest");
menu.update();
i also tried setText. But i think setText is for basic menu items?
I've been trying a lot of different things to no avail.
Verzonden vanuit Outlook<http://aka.ms/weboutlook>
…________________________________
Van: Thomas Forntoh ***@***.***>
Verzonden: woensdag 9 augustus 2023 16:10
Aan: forntoh/LcdMenu ***@***.***>
CC: Wim Grymonprez ***@***.***>; Author ***@***.***>
Onderwerp: Re: [forntoh/LcdMenu] Display variable (Discussion #67)
menu[1]->setValue("AAAAAA")
value is private, you have to use the setter.
—
Reply to this email directly, view it on GitHub<#67 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUKNJ6MUGFLGKAKMDG7M523XUOK33ANCNFSM6AAAAAAT35F6HA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello Thomas,
I've put the sketch on github and i've sent you an invite. This is the whole code, but it is a little long because of all the other things the script does. It also works with the arduino cloud dashboard. I just would like to also use the lcd for local control without having to use my cellphone.
In case you are interested in what this project is for:
This is a project for my brother. He is a window cleaner and he needs pure water for cleaning the windows so he doesn't need to dry after cleaning. When the pure water has dried it doesn't leave a stain. I'm still testing it, so not all variables in real minutes although it says so in the comments i put after.
Verzonden vanuit Outlook<http://aka.ms/weboutlook>
…________________________________
Van: Thomas Forntoh ***@***.***>
Verzonden: woensdag 9 augustus 2023 23:42
Aan: forntoh/LcdMenu ***@***.***>
CC: Wim Grymonprez ***@***.***>; Author ***@***.***>
Onderwerp: Re: [forntoh/LcdMenu] Display variable (Discussion #67)
menu[2] for ITEM_INPUT("TDS1:",inputCallback),
The item indexes start from 1
MAIN_MENU(
1. ITEM_BASIC("OSMOSERINATOR"),
2. ITEM_INPUT("TDS1:",inputCallback),
3. ITEM_SUBMENU("Control", onOffAuto)
);
—
Reply to this email directly, view it on GitHub<#67 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AUKNJ6LWD5CRT4G5YQEQRTDXUP73FANCNFSM6AAAAAAT35F6HA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
You are doing
menu[1][2][1].setText("test");
Say the submenu in the second position of …