View Dockerfile
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 pext/yotta:latest | |
# We need to update Yotta by manually downloading required packages and installing it | |
# This is because Ubuntu 14.04 ships with Python 2.7.6 and there are TLS issues only resolvable by upgrading to 2.7.9 | |
# https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings | |
RUN apt-get -y update && \ | |
apt-get install -y wget && \ | |
wget https://files.pythonhosted.org/packages/65/bd/2908a99239bfe3131ceff479c6fd0388dd53ffaca3543c5216b44618dc44/yotta-0.20.5.tar.gz && \ | |
wget https://files.pythonhosted.org/packages/e2/67/4597fc5d5de01bb44887844647ab8e73239079dd478c35c52d58a9eb3d45/cryptography-2.8-cp27-cp27mu-manylinux1_x86_64.whl && \ |
View adc_config_test.py
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 |
View adc_ref_volt.py
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 |