Code Monkey home page Code Monkey logo

Comments (4)

madhephaestus avatar madhephaestus commented on August 15, 2024

Sure, not a bad idea at all. There are a few different modes in the lib, it would be fairly straight forward for you to add a new mode and submit a Pull Request.

from esp32encoder.

MadTooler avatar MadTooler commented on August 15, 2024

I have tried the different modes and had some success with single edge. I also tried tweaking the library without much luck. A lot of your coding is outside of my current limited understanding of assumed low level higher efficiency and/or esp specific. I spend most of my time with higher level code without as good of a grasp of the nuts and bolts that make it work so well.

Side note, looking around, I have not found a description of how the different encoder modes count or any limitations with specific GPIO pins. Do you have that posted somewhere?

Thanks again!

from esp32encoder.

MadTooler avatar MadTooler commented on August 15, 2024

It looks like using the mode attachSingleEdge(aPin, bPin) is doing the trick. Steps to aPin and Direction to bPin.

Looking over the library and with testing, I think single edge only counts the rising edge of aPin (steps) and increments the count per state of bPin. Is that correct, or is there some extra increments bouncing back and forth that I am missing?

With my bench tests and debounce timing settings in the library, high speed stepping appears limited. My application is pretty slow, but others may not be able to make use. I also have had some erratic loss of observed steps, but that probably is loose jumper wires/breadboard on my test or the lacking MCU/stepper library I was initially using to simulate steps.

from esp32encoder.

madhephaestus avatar madhephaestus commented on August 15, 2024

Sounds like this is resolved then :)

from esp32encoder.

Related Issues (20)

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.