GithubHelp home page GithubHelp logo

Comments (6)

garthvh avatar garthvh commented on July 29, 2024 1

I plan on pushing some changes pretty soon. I wrote it for a talk I gave on IOT, so it is not really in production anywhere. I have not found a solution to the debounce issue, it only happens with ESP01 chips.

from esp8266button.

garthvh avatar garthvh commented on July 29, 2024

I have some stand alone esp8266 chips now, I will try it using your sketch when I have some time

from esp8266button.

niklasenB avatar niklasenB commented on July 29, 2024

Hi, thanks for this great project!
I have the same issue - it's sometimes simply not working and I don't know why.
I was digging into this debounce clause

// Debounce Button Presses boolean debounce() { boolean retVal = false; int reading = digitalRead(BUTTON_PIN); if (reading != LAST_BUTTON_STATE) { LAST_DEBOUNCE_TIME = millis(); } if ((millis() - LAST_DEBOUNCE_TIME) > DEBOUNCE_DELAY) { if (reading != BUTTON_STATE) { BUTTON_STATE = reading; if (BUTTON_STATE == HIGH) { retVal = true; } } } LAST_BUTTON_STATE = reading; return retVal; }

but no idea what can be the cause.
I have an ESP8266-01 using GPIO2, no LEDs (removed from the code) and connecting GPIO 2 to VCC through some resistor. Like 2-3 out of 10 times it's not working.

from esp8266button.

JansZoro avatar JansZoro commented on July 29, 2024

Hi garthvh ,

Have you leave the project? I'm trying to make it works, but I don't know if the present code needs a updating.

Thanks for your answer.

from esp8266button.

JansZoro avatar JansZoro commented on July 29, 2024

I made it work yesterday. Its a good project, I like it. I will prove the new features when you modify the code. I'm going to be attentive.

Thanks again.

from esp8266button.

garthvh avatar garthvh commented on July 29, 2024

New github actions sketch is using new button debounce code

from esp8266button.

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.