picozero
|pypibadge| |docsbadge|
A beginner-friendly library to help you use common electronics components with the Raspberry Pi Pico.
from picozero import LED, Button
led = LED(1)
button = Button(2)
button.when_pressed = led.on
button.when_released = led.off
Status
Beta. There will be bugs and issues. API changes are likely. More devices will be added over time.
Documentation
Documentation is available at picozero.readthedocs.io↗ (opens in a new tab):
- Installation and getting started guide↗ (opens in a new tab)
- Recipes and how-to's↗ (opens in a new tab)
- API↗ (opens in a new tab)
- Example code↗ (opens in a new tab)
Code
The code and project is at github.com/RaspberryPiFoundation/picozero↗ (opens in a new tab).
Issues can be raised at github.com/RaspberryPiFoundation/picozero/issues↗ (opens in a new tab) (see Contributing↗ (opens in a new tab)).
The latest distribution is available at pypi.org/project/picozero/↗ (opens in a new tab).
Thanks
picozero is inspired by gpiozero↗ (opens in a new tab) (and reuses some of its underlying structure), but is, by design, lighter weight and aligned with the Raspberry Pi Pico. Thank you to everyone who has contributed to the gpiozero project.
.. |pypibadge| image:: https://badge.fury.io/py/picozero.svg↗ (opens in a new tab) :target: https://badge.fury.io/py/picozero↗ (opens in a new tab) :alt: Latest Version
.. |docsbadge| image:: https://readthedocs.org/projects/picozero/badge/↗ (opens in a new tab) :target: https://readthedocs.org/projects/picozero/↗ (opens in a new tab) :alt: Docs