Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Ryan Schmidt
Published

The Smart Sign

Elevate your sign at a protest with a smart design that allows for color expression and sounds to show what you stand for.

BeginnerWork in progress161
The Smart Sign

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Rechargeable Battery, Lithium Ion
Rechargeable Battery, Lithium Ion
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Schematics

Front side orientation

Back

Makecode pt. 1

Makecode pt. 2

Video

Code

The Smart Sign Code

ADA
input.onGesture(Gesture.Shake, function () {
    light.showAnimation(light.rainbowAnimation, 500)
})
input.onGesture(Gesture.TiltUp, function () {
    light.setAll(0xff0000)
})
input.onGesture(Gesture.TiltDown, function () {
    light.setAll(0x00ff00)
})
input.onGesture(Gesture.TiltLeft, function () {
    light.setAll(0xffff00)
})
input.onGesture(Gesture.TiltRight, function () {
    light.setAll(0xff00ff)
})
input.onGesture(Gesture.FaceUp, function () {
    light.showRing(
        `red green red green red red green red green red`
    )
})
input.onGesture(Gesture.FaceDown, function () {
    light.showRing(
        `blue yellow blue yellow blue blue yellow blue yellow blue`
    )
})
let rot_x = 0
let accel_x = 0
input.setAccelerometerRange(AcceleratorRange.OneG)
forever(function () {
    accel_x = input.acceleration(Dimension.X)
    rot_x = input.rotation(Rotation.Pitch)
})

Credits

Ryan Schmidt
3 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.