Skip to content

Python library to make a simple and effective interface for a control panel built with push buttons and rotary encoders. Designed for the Raspberry Pi and uses pigpio daemon.

License

Notifications You must be signed in to change notification settings

daniel-falk/rpi-rotary-encoder-and-button-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rpi-rotary-encoder-and-button-lib

https://github.com/daniel-falk/rpi-rotary-encoder-and-button-lib.git

Raspberry Pi interface panel object

Python library to make a simple and effective interface for a control panel built with push buttons and rotary encoders. Designed for the Raspberry Pi and uses pigpio daemon.

Generic setup

Its easy to get going

  • Create an InterfacePanel object
  • Add buttons and rotary encoders using add_button and add_rotary_encoder methods
  • Sit back and relax, when a user interacts you will get a callback

See example.py

Powerfull with features

  • Uses interrupts to listen to gpio's
  • Listen to only push-downs or also duration (dual callback)
  • Dual resolution counting of rotary encoder (counts on rising and falling edge of both outputs)
  • Configurable for ground->io or 5v->io buttons and encoders
  • Configurable for normally open (NC) or normally closed (NC) buttons
  • Uses built in pull-ups and pull-downs in Raspberry Pi

How to connect

Connect the switch between ground and a io. This is the default way, using io_gnd = True and normally_closed assuming your switch opens on click.

--------+
        |
        |
R       |-+
A   I/0 | |------+
S       |-+      |
P       |        |
B       |        o
E       |         \
R       |        --\---| Switch
R       |           \
Y       |        o   \
        |-+      |
P   GND | |------+
I       |-+
        |
        |
--------+

About

Python library to make a simple and effective interface for a control panel built with push buttons and rotary encoders. Designed for the Raspberry Pi and uses pigpio daemon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages