Giter Club home page Giter Club logo

Comments (2)

sobrock12 avatar sobrock12 commented on July 28, 2024

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.

John-Lluch avatar John-Lluch commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.