Christopher Thompson
Published

Extreme Sport Turn Signal Helmet

A helmet with a highly visible turn signal built in, controlled by low profile capacitive touch buttons.

BeginnerFull instructions provided1 hour125
Extreme Sport Turn Signal Helmet

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Li-Ion Battery 1000mAh
Li-Ion Battery 1000mAh
×1
Yellow LED Chain
×2
Alligator Clips
Alligator Clips
×1
Paper Fasteners
×2

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

Tape, Duct
Tape, Duct

Story

Read more

Schematics

Turn Signal Helmet Wiring

Hookups for the Circuit Playground Express

Code

Turn Signal Helmet Code

JavaScript
This is code for the Circuit Playground Express used in this project.
input.touchA1.onEvent(ButtonEvent.Click, function () {
    if (!(Left)) {
        Left = true
        Right = false
    } else {
        Left = false
        Right = false
    }
})
input.touchA2.onEvent(ButtonEvent.Click, function () {
    if (!(Right)) {
        Left = false
        Right = true
    } else {
        Left = false
        Right = false
    }
})
let Right = false
let Left = false
Left = false
Right = false
forever(function () {
    if (Right) {
        pins.A3.digitalWrite(false)
        pins.A4.digitalWrite(true)
    } else if (Left) {
        pins.A3.digitalWrite(true)
        pins.A4.digitalWrite(false)
    } else {
        pins.A3.digitalWrite(false)
        pins.A4.digitalWrite(false)
    }
    pause(500)
    pins.A3.digitalWrite(false)
    pins.A4.digitalWrite(false)
    pause(500)
})

Credits

Christopher Thompson
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.