peterhinch / micropython-async

Application of uasyncio to hardware interfaces. Tutorial and code.
MIT License
744 stars 169 forks source link

ESwitch: fire close event when _state goes high #91

Closed sandyscott closed 2 years ago

sandyscott commented 2 years ago

A state transition from 0 to 1 should fire the close event and vice-versa - the comments in the code mention a normally open switch - ie. open = not pressed = inactive = 0. Alternatively language other than open/close might such as activate or deactivate might fit better

peterhinch commented 2 years ago

Thank you.