Samory Forster
Published

Project 2-Protest Object-Anime is MIsunderstood

Take a Dive! Anime can be impressive!

BeginnerShowcase (no instructions)4 hours458
Project 2-Protest Object-Anime is MIsunderstood

Things used in this project

Hardware components

Alligator Clips
Alligator Clips
×1
Toggle Switch, (On)-Off-(On)
Toggle Switch, (On)-Off-(On)
×1
Circuit Playground Express
Adafruit Circuit Playground Express
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Story

Read more

Schematics

Project 2-Process

img_20191002_171834789_fJHp3cS0gh.jpg

img_20191007_191018691_gTOCdgS4E9.jpg

img_20191007_191036730_VbOSxYvJTF.jpg

Code

Project 2 code

JavaScript
Put this inside of MakeCode
input.buttonA.onEvent(ButtonEvent.Click, function () {
    music.playMelody("G B A G C5 B A B ", 2)
})
pins.A1.setPull(PinPullMode.PullUp)
forever(function () {
    if (!(pins.A1.digitalRead()) && input.lightLevel() < 5) {
        music.baDing.playUntilDone()
        light.showAnimation(light.rainbowAnimation, 500)
    } else {
        music.baDing.stop()
        light.showAnimation(light.rainbowAnimation, 500)
    }
})

Credits

Samory Forster
4 projects • 0 followers
Thanks to Mike Barela .

Comments