Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from microbit import *
import neopixel
np = neopixel.NeoPixel(pin0, 32)
while True:
tmp = pin1.read_analog()
temp = ((tmp * (3300.0/1024.0))-500.0)/10.0
tempcolour = int((temp * 3.6))
for pix in range (0,32):
np[pix] = (tempcolour,0,(255-(tempcolour*2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment