Raymond Boysel
Published

Warning Light Protestor Riot Shield

A home made riot shield with an accelerometer and lights attached that react at different force levels.

IntermediateFull instructions provided2 hours232
Warning Light Protestor Riot Shield

Things used in this project

Hardware components

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

Hand tools and fabrication machines

Tape, Duct
Tape, Duct
Tape, Velcro® Stick On Tape/Strip
Tape, Velcro® Stick On Tape/Strip

Story

Read more

Code

Accelerometer Code

JavaScript
light.setBrightness(255)
forever(function () {
    if (input.acceleration(Dimension.Strength) >= 3000) {
        light.showRing(
            "red red red red red red red red red red"
        )
    } else if (input.acceleration(Dimension.Strength) >= 2000) {
        light.showRing(
            `yellow yellow yellow yellow yellow yellow yellow yellow yellow yellow`
        )
    } else {
        light.clear()
    }
})

Credits

Raymond Boysel

Raymond Boysel

4 projects • 0 followers

Comments