This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure node is at v16 | |
# asdf local nodejs 16.19.1 | |
git clone https://github.com/microsoft/pxt-microbit.git | |
cd pxt-microbit | |
npm install pxt --no-save | |
npm install | |
# To use a different CODAL version the branch/tag can be configured changing pxtarget.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from microbit import pin0 | |
NRF_ADC_BASE = 0x40007000 | |
NRF_ADC_CONFIG = NRF_ADC_BASE + 0x504 | |
@micropython.asm_thumb | |
def reg_read(r0): | |
ldr(r0, [r0, 0]) | |
@micropython.asm_thumb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from microbit import pin0, pin1 | |
NRF_ADC_BASE = 0x40007000 | |
NRF_ADC_CONFIG = NRF_ADC_BASE + 0x504 | |
@micropython.asm_thumb | |
def reg_read(r0): | |
ldr(r0, [r0, 0]) | |
@micropython.asm_thumb |