Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/selfhostedhome/micropython-debounce-switch

MicroPython Class for Debouncing Switches
https://github.com/selfhostedhome/micropython-debounce-switch

Last synced: 2 months ago
JSON representation

MicroPython Class for Debouncing Switches

Lists

README

        

# micropython-debounce-switch

A MicroPython Class for Debouncing Switches. Read the [full blog article](https://selfhostedhome.com/debouncing-buttons-in-micropython/).

## Files

* `switch.py` is complete source for the class
* `switch.mpy` is the cross-compiled version for *MicroPython v1.9.4*.
* `example/main.py` shows an example of the class in action.

I recommend using the cross-compiled version or cross-compiling your own version
to save on memory usage. Note that the version it was cross-compiled for must
match the version of MicroPython you are running.