Comments (4)
Yes its possible, i've been using one (3 wires) but you can virtually adapt any other as the library input is generalized to streams, in this case my encoder driver (included quadEncoder.h) just outputs characters '+','-' for the movements.
Click his handled by a key/keyboard driver (also included keyStream.h), on the encoder case its a one button keyboard
from arduinomenu.
Thar si a great thing to know. I Am so sorry for being this dumb but would you please send me an example in how to do it?
Please!! I am desperate, I being trying and failing miserably.
from arduinomenu.
as in example/lcd_menu:
//define the pins to be used
#define encA 2
#define encB 4
//this encoder has a button here
#define encBtn A0
...
//the quadEncoder
quadEncoder quadEncoder(encA,encB);//simple quad encoder driver
quadEncoderStream enc(quadEncoder,5);// simple quad encoder fake Stream
//a keyboard with only one key :D, this is the encoder button
keyMap encBtn_map[]={{-encBtn,menu::enterCode}};//negative pin numbers means we have a pull-up, this is on when low
keyLook<1> encButton(encBtn_map);
//multiple inputs allow conjugation of the quadEncoder with a single key keyboard that is the quadEncoder button
Stream* in[]={&enc,&encButton};
chainStream<2> quadEncoder_button(in);
//alternative to previous but now we can input from Serial too...
Stream* in3[]={&enc,&encButton,&Serial};
chainStream<3> allIn(in3);
check out the example file, it runs on the lcd also used on ide demo
from arduinomenu.
Hello Rui,
many thanks for your help! It works great now with 1.6.4. I asked about
1.0.6 cause i have the libs of the 1.0.6 environment installed in my
AtmelStudio which i am using instead of the original arduino ide. I
think I have to play around a bit on installing the 1.5.x or the 1.6.x
libraries instead of the 1.0.6. But it should be a not too big problem
(planned to go this step sooner or later anyway).
regards and greetings from austria
Robert
Am 28.05.2015 um 02:36 schrieb Rui Azevedo:
//define the pins to be used
#define encA 2
#define encB 4
//this encoder has a button here
#define encBtn A0...
//the quadEncoder
quadEncoder quadEncoder(encA,encB);//simple quad encoder driver
quadEncoderStream enc(quadEncoder,5);// simple quad encoder fake Stream//a keyboard with only one key :D, this is the encoder button
keyMap encBtn_map[]={{-encBtn,menu::enterCode}};//negative pin numbers
means we have a pull-up, this is on when low
keyLook<1> encButton(encBtn_map);//multiple inputs allow conjugation of the quadEncoder with a single
key keyboard that is the quadEncoder button
Stream* in[]={&enc,&encButton};
chainStream<2> quadEncoder_button(in);//alternative to previous but now we can input from Serial too...
Stream* in3[]={&enc,&encButton,&Serial};
chainStream<3> allIn(in3);
from arduinomenu.
Related Issues (20)
- 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
- Debouncing Buttons HOT 1
- Debug option HOT 1
- Changing CHOOSE variable using a FIELD crashes program
- U8G2 + CodeCtrl Crash on ESP32: Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited)
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.