ivana pagan
Published

Protest Parking Fees Object

I shouldn't have to pay for parking sing I paid thousands in tuition.

BeginnerShowcase (no instructions)3 hours626
Protest Parking Fees Object

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Li-Ion Battery 1000mAh
Li-Ion Battery 1000mAh
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

paper
exacto knife
red marker
celophane tape

Story

Read more

Code

Strobe light w/ alarm

JavaScript
This code was made in Makecode with the block settings. Translated to javascript here.
input.onLightConditionChanged(LightCondition.Dark, function () {
    light.showRing(
    `white white white white white white white white white white`
    )
    music.playSound(music.sounds(Sounds.Siren))
})
input.onLightConditionChanged(LightCondition.Bright, function () {
    light.showRing(
    `black black black black black black black black black black`
    )
    music.stopAllSounds()
})
input.setLightThreshold(LightCondition.Bright, 50)
forever(function () {
    light.setBrightness(255)
    pause(0.5)
    light.setBrightness(0)
    pause(0.5)
})

Credits

ivana pagan
4 projects • 0 followers
Thanks to John Park.

Comments