alanesq / basicoledmenu Goto Github PK
View Code? Open in Web Editor NEWA very simple menu system using an oled and rotary encoder
License: GNU General Public License v3.0
A very simple menu system using an oled and rotary encoder
License: GNU General Public License v3.0
Hello!
First of all, thank you for your example!
I get the following errors in the serial monitor:
Error: invalid rotary encoder pin state - prev=0,0 new=0,1
However, navigating through the menu works. Any idea why this happens?
I use the KY040 Rotary Encoder (https://www.ebay.co.uk/itm/274296632950).
Thanks in advance for any tip and help! :-)
Take care...
Hello,
first of all, I would like to say that this Menu with Encoder is very good and thank you for sharing it.
I am some kind of beginner in c++. That is why I come here to ask for help.
I think it would be nice to have the possibility to change the values in the Submenu depending on the speed that the encoder is turning.
What I mean is. If turning the encoder slow it would encrease or decrease the value by 1. If turning fast it would change the value by 10 for example.
I would make the following change in the code as follow.
"
// demonstration enter a value
void value1() {
resetMenu();
menuMode = value;
oledMenu.menuTitle = "demo_value";
oledMenu.mValueLow = 0;
oledMenu.mValueHigh = 100;
If (slow_fast== 0) {
oledMenu.mValueStep = 1;
}
If (slow_fast== 1) {
oledMenu.mValueStep = 10;
}
oledMenu.mValueEntered = 50;
}
"
Only I don't know, where and how I could change inside the code the variable slow_fast from state 1 or 0.
I would appreciate your point of view and thanks in advance for some help.
hi, great work there mate,
I have a question, how do you display live data calculated from analog pins in one of the menus?
I was searcing a menu code for my project and found this interesting for me. Tried compile with arduino ide 1.8.11, for ESP32 DevModule, but got error message:
enumeration value 'off' not handled in switch [-Werror=switch]
What is the problem?
I'm using an Arduino Pro Mini. The SDA and SCL pins are still A5 and A4. However I get this same error when I try to upload to an Uno so I don't think it is a board issue. This code looks awesome and I want to try it but I am having this issue:
It doesn't like this line of code: " Wire.begin(I2C_SDA,I2C_SCL); "
It highlights it when I try to upload it and gives me the following error info
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:53:10: note: candidate expects 0 arguments, 2 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:54:10: note: candidate: void TwoWire::begin(uint8_t)
void begin(uint8_t);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:54:10: note: candidate expects 1 argument, 2 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:55:10: note: candidate: void TwoWire::begin(int)
void begin(int);
^~~~~
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:55:10: note: candidate expects 1 argument, 2 provided
exit status 1
no matching function for call to 'TwoWire::begin(const uint8_t&, const uint8_t&)'
Hi Alan,
searching for a good and easy to use menu system I found yours and I'm quite enthusiastic on it.
I'm a total greenhorn on all this coding in C++ - so please excuse my poor knowledge on it.
I recently bought an Arduino Uno R4 and I'm fine with it. Now I'm putting together some code to run a menu using this Uno R4, an OLED 128x64 and a Rotary Encoder KY-040 using the u8g2 library.
For the encoder I found a "state version of reading a KY-040, It offers full accuracy unlike other solutions" published by ownprox.
Source is: GitHub - ownprox/Rotary_Encoder_KY-040_Fixed: This is a state version of reading a KY-040 for Arduino, It offers full accuracy unlike other solutions.
Maybe you can include in your project a version which is running with that environment.
For me personnally it would be great if you could provide some advice.
Kind regards
Karl
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.