Skip to content

Instantly share code, notes, and snippets.

# (c) 2024 David Whale - 20/03/2024
# ARM thumb assembly language that reads button A
from microbit import *
from micropython import const
REG_GPIO_P0 = const(0x50000000)
REG_GPIO_IN = const(REG_GPIO_P0 + 0x510)
BUTTON_A_PIN = const(14) # P0_14 of the nRF5x GPIO block