pingo-io / pingo-py

Generic API for controlling boards with programmable IO pins
http://pingo.io
MIT License
257 stars 50 forks source link

Switch / Push button : short pressed / long pressed events #98

Open scls19fr opened 8 years ago

scls19fr commented 8 years ago

Hello,

I think it will be nice to have an API to support short pressed / long pressed events with Switch (or maybe in an other class like PushButton).

here is an example https://github.com/martinohanlon/pelmetcam/blob/master/pelmetcam.py (see ButtonControl class) with Raspberry and RPi.GPIO

see also (sorry in french) http://hardware-libre.fr/2014/03/raspberry-pi-plusieurs-fonctions-avec-un-seul-bouton-2/

Kind regards