Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
D'ante McCain
Published © GPL3+

Blink and Blue

One switch makes the lights blink faster the other changes the lights to blue.

BeginnerFull instructions provided2 hours171
Blink and Blue

Story

Read more

Code

My Code

JavaScript
pins.A1.setPull(PinPullMode.PullUp)
forever(function () {
    if (!(pins.A7.digitalRead())) {
        light.setAll(0xff0000)
    } else {
        light.clear()
    }
})
forever(function () {
    if (!(pins.A1.digitalRead())) {
        light.setAll(0x0000ff)
    } else {
        light.clear()
    }
})

Credits

D'ante McCain
4 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.