Comments (2)
Hi,
tested it (again) on a WeMos D1 Mini and it works:
Longpress is defined as 200ms, after that I get the following output:
Longpress Handler Demo
You clicked a really really long time. (3988 ms)
You clicked a really really long time. (1614 ms)
You clicked a really long time. (1052 ms)
You clicked a really long time. (1326 ms)
You clicked a really really long time. (1982 ms)
You clicked a long time. (877 ms)
You clicked a long time. (637 ms)
You clicked long. (399 ms)
You clicked long. (327 ms)
You clicked a long time. (522 ms)
You clicked long. (339 ms)
You clicked long. (311 ms)
You clicked long. (213 ms)
The wiring was: D7 --> BTN --> GND
Also had similar results with Adafruit Feather Huzzah ESP8266. There I used pin 2.
Unfortunately, I cannot reproduce your result.
from button2.
I've borrowed the code from LongpressHandler demo, and it doesn't work.
Then I just tried the demo, and... it doesn't work either - only the 'welcome message' is shown, and no reaction on clicks.The 'button' is connected to D1 and GND, so I've adjusted the demo sketch:
#define BUTTON_A_PIN D1
Platform: ESP8266 (NodeMCU V3) / Arduino IDE 1.8.13 / ESP8266 Core 2.7.4
Have you made this work? I'm facing a similar problem. In my case, not only the longpresshandler demo but also other demos are not working. Just see the welcome message and nothing's happening in my Serial Monitor
from button2.
Related Issues (20)
- detection of long presses does not work properly inside of an interupt timer HOT 2
- Interrupt wdt timeout on CPU1 HOT 2
- button.isPressed(); seems to stay latched. HOT 1
- Long press is not reported in polling mode HOT 1
- Change std::functional guards from platform-based to language version-based HOT 1
- multiple ESP32CapacitiveTouch.ino HOT 1
- 2.3.0 breaks at least on RP2040 with type errors HOT 3
- 2.3.x breaks default implementation? HOT 4
- Advices for implementing a speed-sensitive button-press control HOT 1
- setStateHandler Functions HOT 1
- Multiplexed buttons support HOT 1
- Use hall sensor instead button HOT 1
- 2.3.x does not compile on Arduino Uno R4 HOT 3
- Watchdog timer triggered on both ESP32 Capacitive Touch examples HOT 1
- virtual button init callback HOT 1
- another i2c PE button question HOT 8
- update constants in examples
- Problem with longpress behavior HOT 3
- [question] Is it compatible with all microcontrollers having an Arduino framework implementation? HOT 2
- Multiple Button Issue
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 button2.