Code

mini-kühlschrankTür.hexJavaScript
The sensor measures the lightness and returns 0 when it is dark and 255 when it's light.
basic.forever(() => {
    if (input.lightLevel() > 10) {
        basic.showString("Tür zu!")
    } else {
        basic.showString("Ah, ich bin allein! Da mach ich heimlich Disco!")
        basic.setLedColor(Colors.Red)
        basic.pause(100)
        basic.setLedColor(Colors.Yellow)
        basic.pause(100)
        basic.setLedColor(Colors.Green)
        basic.pause(100)
        basic.setLedColor(Colors.Blue)
        basic.pause(100)
    }
})

Credits

D6949fc4e0cc612e4d91cbf9fa1668ef
Maxim Loick

Co-Founder of Calliope.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlog