Smart Creativity
Published ยฉ CC BY

Happy Birthday Gift rainbow lighting/ #smartcreativity

I make this project as a birthday gift. Very cool animation lighting LED gift.

BeginnerFull instructions provided1 hour285

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
ร—1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
ร—1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Code

Code

Scratch
Upload in CPX
input.onLoudSound(function () {
    light.showAnimation(light.rainbowAnimation, 2400)
    pause(500)
    light.showRing(
    `black black black black red red black black black black`
    )
    pause(500)
    light.showRing(
    `black black black blue red red blue black black black`
    )
    pause(500)
    light.showRing(
    `black black pink blue red red blue pink black black`
    )
    pause(500)
    light.showRing(
    `black green pink blue red red blue pink green black`
    )
    pause(500)
    light.showRing(
    `yellow green pink blue red red blue pink green yellow`
    )
    pause(500)
    light.showAnimation(light.rainbowAnimation, 2000)
})
forever(function () {
    music.setVolume(50)
    music.siren.loop()
    light.setBrightness(255)
    light.setAll(0xff00ff)
    pause(2000)
    light.setAll(0x0000ff)
    pause(2000)
    light.setAll(0x007fff)
    pause(2000)
    light.setAll(0x00ff00)
    pause(2000)
    light.setAll(0xff9da5)
    pause(2000)
    light.setAll(0xff0000)
    pause(2000)
    light.setAll(0xff8000)
    pause(2000)
    light.setAll(0x7f00ff)
})

Credits

Smart Creativity
25 projects โ€ข 36 followers
A creative student....๐Ÿง’๐Ÿง’๐Ÿง‘
Contact

Comments

Please log in or sign up to comment.