Skip to content

This Arduino sketch implements properly a simple pin change interrupt on any ESP microcontroller (ESP8266 and ESP32).

License

Notifications You must be signed in to change notification settings

Naguissa/ESP_INTERUPT_TEST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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?

Contribute

Any code contribution, report or comment are always welcome. Don't hesitate to use GitHub for that.

Thanks for your support.

Contributors hall of fame: https://www.foroelectro.net/hall-of-fame-f32/contributors-contribuyentes-t271.html

About

This Arduino sketch implements properly a simple pin change interrupt on any ESP microcontroller (ESP8266 and ESP32).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages