Comments (6)
at the current state it will be useful only to do the menu part, all the desktop part would have to be coded apart, but the menu can cooperate as you can call/suspend several menus whenever needed.
doing the desktop part poses some problems for the current version
1 - the menu system is not doing associations with button and actions, actions are only associated with menu prompts
2 - menu prompts are limited to one line
from arduinomenu.
If I code my idea only using your classes, it it possible to use buttons associated with UP, DOWN codes when menu is not polling?
void loop() {
if (!runMenu) {
if (allIn.read() == menu::enterCode) {
runMenu = true;
mainMenu.sel = 0; // reset the menu index fornext call
} else if (allIn.read() == menu::upCode) {
//do smth;
} else if (allIn.read() == menu::downCode) {
//do smth;
}
} else
mainMenu.poll(menu_out,allIn); // temporary control and display on Serial Monitor
}
from arduinomenu.
yes, you can use input and output classes without/outside menu polling.
also the menu can do some association between buttons and actions, if your keyboard driver sends numeric characters for button press then the menu will call associated option.
options are numbered from 1 to 9 on serial menu and characters 1...9 have the effect of clicking the option.
beware that each .read() removes the character, it would be better to do a single read and then test the character.
from arduinomenu.
void loop() {
if (runMenu)
mainMenu.poll(menu_out,allIn); // temporary control and display on Serial Monitor
else if (allIn.available()) {
char ch=allIn.read();
if (ch == menu::enterCode) {
runMenu = true;
mainMenu.sel = 0; // reset the menu index fornext call
} else if (ch == menu::upCode) {
//do smth;
} else if (ch == menu::downCode) {
//do smth;
}
}
}
from arduinomenu.
Thanks!
I have 2 buttons in my device: upCode & enterCode
I prepair to add Exit option to exit from submenu and stop polling in main menu.
There is a same menu control in GoPro :)
from arduinomenu.
I done library:
https://github.com/dontsovcmc/ArduinoMultiDesktop
from arduinomenu.
Related Issues (20)
- "dynamic initialization" linking error when combining Menu::style and using rotaryEventIn.h
- EDIT via rotary encoder
- is your libary compatible with OLED display with 1309 controller
- Use of SSD1306ASCII_OUT HOT 1
- Not working without serial connection HOT 1
- TFT_eSPI and FreeFont (custom font) HOT 1
- error: reference to 'config' is ambiguous
- Full graphic smart controller - cannot get the ecnoder to scroll nicely
- Disable SerialOut HOT 1
- Starting integration of LCDGFX display driver with ArduinoMenu HOT 1
- Events on SELECT-submenu out of sync
- Feature Request: Have a way to disable a menu entry by default
- After defining MENU_DEBUG project doesn't compile for ESP32
- Example request: A working ESP32WebMenu example would be nice
- SubMenu does not respond unless extra menu item is added
- noMacros example should also show how to incorporate inputs and outputs without macros
- Doesn't compile with latest board ESP32 v. 3.0.0-alpha2
- Hide a menu
- Support for EA DOGM series of displays using SSD1803 controller IC
- Support for Initialization Outside of Main HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinomenu.