Custom screen integration #85
Replies: 2 comments 1 reply
-
I'm answering to myself : I added another inclusion of LiquidCrystal_I2C.h directly to my main program and add a new object "screen" to adress it : #include <LiquidCrystal_I2C.h> and init it :
Then, I added a new command object from the main menu :
and finally complete with the called function "mesures" where I can set the LCD commands : void mesures() { OK. So it works, but it's not optimized, as I have two display objects (screen and lcd). So obviously it's not a "Beautiful code" at all, haha ! It would be cool to get this feature in a future version ;-) |
Beta Was this translation helpful? Give feedback.
-
You can use e.g. ...
menu.hide();
menu.lcd->setCursor(0, 0);
menu.lcd->print("hh:mm:ss");
... Hide function signature /**
* When you want to display any other content on the screen then
* call this function then display your content, later call
* `show()` to show the menu
*/
void hide(); |
Beta Was this translation helpful? Give feedback.
-
Hello
Until now, I was using lcd.setCursor(x,y) and lcd.print methods from traditionnal LiquidCrystal_I2C library to build custom screens with measurements values. I didn't see any option to integrate customs screens but may be I missed it
It would be a new item class, let's call it "ItemScreen". it will act like a submenu, but it would display a custom screen.
The custom screen (composed with lcd.print and lcd.setcursor would be described as a function in the user program and declared as extern in order to be called by library LcdMenu.h
Hope you'll be interested with my proposal ;-)
Beta Was this translation helpful? Give feedback.
All reactions