Ethan Osborne
Published

Littering Protest Object

A shoe that detects objects in front of it, alerts person of object with alarm/lights, and resets by shaking, all to protest against litter.

BeginnerFull instructions provided1 hour731
Littering Protest Object

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Adafruit lithium ion battery
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

Tape, Clear
Tape, Clear
Any Shoe
Just no flip flops or open toed shoes

Story

Read more

Schematics

Protest Object Demonstration

A video demonstrating the protest object working

Code

Protest Object Light Sensor Code

JavaScript
Code that uses the light sensor
input.onLightConditionChanged(LightCondition.Dark, function () {
    light.showRing(
    `red red red red red red red red red red`
    )
    music.playSound(music.sounds(Sounds.Siren))
})
input.onLightConditionChanged(LightCondition.Bright, function () {
    light.showRing(
    `black black black black black black black black black black`
    )
})
input.onGesture(Gesture.Shake, function () {
    light.clear()
})
input.setLightThreshold(LightCondition.Bright, 50)
forever(function () {
    light.setBrightness(255)
    pause(0.5)
    light.setBrightness(0)
    pause(0.5)
})

Credits

Ethan Osborne
4 projects • 2 followers
Contact
Thanks to Ivana Pagan.

Comments

Please log in or sign up to comment.