Comments (2)
After some further thinking and researching, I think I have some solutions to my problems...
Option One: this Arduino Micro board I have actually has way more digital pins that I can use than I initially thought...so I may just end up hooking up the pushbuttons regardless!
Option Two: Even if I didn't want to use the pushbuttons, I still could just pass a digital pin that is in use for a different component into the constructor for the Encoder object in order to properly create it, and then I could just do nothing with that data regarding the encoder operation. Just because I assign a pin to create the object doesn't mean I have to use it, and I don't think that will mess up operation of any other component/code that actually IS utilizing that pin, that should all continue to work correctly. Let me know if my train of thought checks out there.
Thanks again!
Stan
from encoder.
Hi,
I think you have answered your own question!.
Indeed, you can pass any input pin as the pushbutton, and then just not use it with the library. The encoder should work just fine.
Or better yet, you can even use any pushbutton you already have in your project that you want to debounce, and pass it to the Encoder library even if that button is not physically attached to the Encoder. By calling encoder.button() you will still get the debouncing effect applied to that button. Maybe that's also useful for you in case you have a button with critical operation that needs to operate in a 'clean' way.
from encoder.
Related Issues (11)
- ATMega328 not supported? HOT 2
- Debouncer class name conflicts with dedicated Debouncer libraries
- Nano: button works, but noise on rotary HOT 6
- Hold? HOT 1
- Adding a ready to compile example-code? HOT 1
- small extra feature?
- using the millis() timer0 alternative
- Please add a License HOT 4
- Bob HOT 3
- ESP32 HOT 4
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 encoder.