-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMicroBit_TempTransmit.py
More file actions
33 lines (27 loc) · 1.13 KB
/
MicroBit_TempTransmit.py
File metadata and controls
33 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# This script will display temperature on the Microbit & transmit via BLE (V1, Firmware 0249, Sept 2021)
# IDE (Integrated Development Environment)
# https://codewith.mu
# Bill of Materials
# Microbit v2 Go Kit
# https://www.adafruit.com/product/4834
# Source code
# https://microbit.org/projects/make-it-code-it/thermometer/?editor=python
# https://microbit.org/projects/make-it-code-it/max-min-thermometer/?editor=python
# https://github.com/AnchorageBot
# Engineering background
# https://lancaster-university.github.io/microbit-docs/ble/temperature-service/
# https://lancaster-university.github.io/microbit-docs/ubit/thermometer/
# https://microbit-micropython.readthedocs.io/en/v1.0.1/tutorials/radio.html
# https://microbit-micropython.readthedocs.io/en/v1.0.1/filesystem.html
# https://core-electronics.com.au/tutorials/micropython-workshop-for-microbit.html
from microbit import *
import radio
radio.config(group=23)
radio.on()
while True:
if button_a.was_pressed():
display.scroll(temperature())
radio.send(str(temperature()))
else:
radio.send('lights off')
sleep(10000)