Last active
November 14, 2019 18:57
-
-
Save descartez/97bef1e1d6d8e602f1a78e372257223e 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 * | |
while True: | |
moisture = pin0.read_analog() | |
if button_a.is_pressed(): | |
if moisture <= 1023 and moisture > 0: | |
display.scroll(moisture) | |
else: | |
display.show(Image.SAD) | |
sleep(5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment