Code Monkey home page Code Monkey logo

Comments (5)

madhephaestus avatar madhephaestus commented on July 16, 2024 1

from esp32encoder.

madhephaestus avatar madhephaestus commented on July 16, 2024

https://madhephaestus.github.io/ESP32Encoder/classESP32Encoder.html#ac565f0e078a89ab9ddcd8b6890365751

from esp32encoder.

tinyboxxx avatar tinyboxxx commented on July 16, 2024

thanks for your quick reply,

I did noticed that attachSingleEdge function, but one question:
Since I only got one signal pin, but which pin should I put into bPinNumber ?

thanks again.

from esp32encoder.

tinyboxxx avatar tinyboxxx commented on July 16, 2024

huge Thanks!

from esp32encoder.

tinyboxxx avatar tinyboxxx commented on July 16, 2024

Hello, I got error when ESP32 booting, in serial.

E (719) pcnt: pcnt_unit_config(57): PCNT pluse input io error
E (720) pcnt: pcnt_unit_config(57): PCNT pluse input io error
E (720) pcnt: pcnt_unit_config(57): PCNT pluse input io error
E (725) pcnt: pcnt_unit_config(57): PCNT pluse input io error

ESP32 does keep running. Any idea what cause this error? Does some GPIO I can't use?
Thanks.

Code I use:

#include <ESP32Encoder.h>
ESP32Encoder encoder_speed;
ESP32Encoder encoder_rpm;

//in setup:

  ESP32Encoder::useInternalWeakPullResistors = UP;
  encoder_speed.attachSingleEdge(27, 27); // SPD
  encoder_rpm.attachSingleEdge(34, 34);   // RPM

//in loop:
        PulseCounter_SPD = (int32_t)encoder_speed.getCount();
        PulseCounter_RPM = (int32_t)encoder_rpm.getCount();

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.