I’ve merged the Pibrella testing branch and pushed the result, Version 1.1.7, to pip for all to enjoy.
You should be able to upgrade with:
pip install pibrella --upgrade
- Fixed buzzer to stop after playing melody - Wrapped changed/pressed/released so they can be registered simultaneously - Added "len" to pin collections, to support random.choice(pibrella.light) - Added error if run without root
Thanks goes to @ben for making me realize that “pibrella.light”, “pibrella.input” and “pibrella.output” should support len() so that they work directly with random.choice. You can now do things like:
import pibrella, time, random while True: light = random.choice(pibrella.light) light.on() time.sleep(0.5) light.off() time.sleep(0.5)