Loading…
KiCad design files for a simple shield for the Raspberry Pi Pico. The shield is designed to easily break out most of the Pico's GPIO pins to multiple 2-pin 2.54mm pitch male headers. This makes it convenient for connecting external components like buttons, switches, LEDs, or sensors using standard Dupont wires. Ideal for prototyping or creating simple custom interfaces.
This example demonstrates reading multiple buttons connected to the shield using the SimpleButton module on MicroPython.
import sys
from utime import sleep_ms
from machine import Pin
from simple_button import SimpleButton
def echo(message: str) -> None:
sys.stdout.write(f"{message} \n")
def main() -> None:
gpio = list(range(23))
buttons: list[SimpleButton] = []
for index, gpio_pin in enumerate(gpio):
buttons.append(
SimpleButton(
gpio_pin,
press_callback=lambda i=index: echo(f"Button {i} pressed"),
release_callback=lambda i=index: echo(f"Button {i} released"),
pull=Pin.PULL_UP,
active_low=True
)
)
while True:
# Do other things or just sleep
sleep_ms(500)
if __name__ == "__main__":
main()
Loading 3D model… large boards can take a moment.
No comments yet. Be the first to ask about this board.