https://github.com/naguissa/esp_interupt_test
This Arduino sketch implements properly a simple pin change interrupt on any ESP microcontroller (ESP8266 and ESP32).
https://github.com/naguissa/esp_interupt_test
arduino esp esp-microcontroller esp32 esp8266 interrupt interrupts naguissa
Last synced: 12 months ago
JSON representation
This Arduino sketch implements properly a simple pin change interrupt on any ESP microcontroller (ESP8266 and ESP32).
- Host: GitHub
- URL: https://github.com/naguissa/esp_interupt_test
- Owner: Naguissa
- License: lgpl-3.0
- Created: 2021-03-03T08:17:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-03T08:33:24.000Z (almost 5 years ago)
- Last Synced: 2025-01-01T22:11:38.722Z (about 1 year ago)
- Topics: arduino, esp, esp-microcontroller, esp32, esp8266, interrupt, interrupts, naguissa
- Language: C++
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## ESP8266 and ESP pin interrupt example ##
This Arduino sketch implements properly a simple pin change interrupt on any ESP microcontroller (ESP8266 and ESP32).
Note that it's not using any debouncing, for buttons it's better to use any dedicated library. It's only a correct implementation example.
### Configuration ###
You can change test pin changing BUTTON_PIN define.
It's configured as INPUT_PULLUP, so to trigger it you have to connect it to ground.
### Compilation ###
You can compile the sketch using Arduino IDE with ESP8266 or ESP32 support.
### Usage ###
Input pin is configured as INPUT_PULLUP, so to trigger it you have to connect it to ground.
It will differentiate between short and long press (> 1s pressed).
### Hardware ###
No extra hardware is needed, except for power supply and a cable to connect input pin to GND.
## Who do I talk to? ##
* [Naguissa](https://github.com/Naguissa)
* https://www.foroelectro.net/electronica-digital-microcontroladores-f8/sencillo-ejemplo-de-manejo-de-interrupciones-en-ar-t418.html
* https://www.naguissa.com
## Contribute ##
Any code contribution, report or comment are always welcome. Don't hesitate to use GitHub for that.
* You can sponsor this project using GitHub's Sponsor button: https://github.com/Naguissa/ESP_INTERUPT_TEST
* You can make a donation via PayPal: https://paypal.me/foroelectro
Thanks for your support.
Contributors hall of fame: https://www.foroelectro.net/hall-of-fame-f32/contributors-contribuyentes-t271.html