# Press the green Play button on the right to start the simulation.
# 
# Your code will run, and then you'll get the MicroPython REPL.
# 
# The REPL is an interactive prompt where you can type python commands and see the results immediately.
# Type help() for MicroPython API cheat sheet. To paste code into the REPL press Ctrl+E.
#
# Press the blue pushbutton to interact with the example.

import display
import buttons

print("Hello, MCH2022 Badge!")

display.drawFill(display.WHITE)
display.drawText(10, 10, "Hello, MCH2022 badgePython!", display.MAGENTA, "roboto_regular18")
display.flush()

def on_action_btn(pressed):
  if pressed:
    display.drawText(10, 60, "Hello, button!", display.BLUE, "roboto_regular18")
    display.flush()
    print("Action button pressed!")

buttons.attach(buttons.BTN_A, on_action_btn)
Loading
mch2022-badge
RP2040Breakout