Created
April 29, 2017 08:43
-
-
Save fab3r/e38de86336202358f7005b67745a48a9 to your computer and use it in GitHub Desktop.
UV light protector
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
let UV = 0 | |
basic.forever(() => { | |
UV = input.lightLevel() | |
if (UV < 190) { | |
basic.showIcon(IconNames.Yes) | |
basic.pause(1000) | |
basic.showIcon(IconNames.Happy) | |
basic.pause(1000) | |
} else if (UV >= 190) { | |
basic.showLeds(` | |
# . . . # | |
. # . # . | |
. . # . . | |
. # . # . | |
# . . . # | |
`) | |
basic.pause(1000) | |
basic.showIcon(IconNames.Sad) | |
basic.pause(1000) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment