Created
November 17, 2016 10:57
-
-
Save proto-pic/c3dd7ad00e58bc2f1e85ddd92f3ac222 to your computer and use it in GitHub Desktop.
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 * | |
import neopixel | |
np = neopixel.NeoPixel(pin0, 32) | |
while True: | |
tmp = pin1.read_analog() | |
temp = ((tmp * (3300.0/1024.0))-500.0)/10.0 | |
display.scroll(str(temp)) | |
tempcolour = int((temp * 3.6)) | |
for pix in range (0,32): | |
np[pix] = (tempcolour,0,(255-(tempcolour*2))) | |
np.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment