Samory Forster
Published

Project 1-Dunce Hat

It's fun humiliation!

BeginnerShowcase (no instructions)1,456
Project 1-Dunce Hat

Things used in this project

Hardware components

USB Li Ion Battery Charger
Adafruit USB Li Ion Battery Charger
×1
Alligator Clips
Alligator Clips
×1
Circuit Playground Express
Adafruit Circuit Playground Express
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

Tape, Electrical
Tape, Electrical
Scissor, Electrician
Scissor, Electrician

Story

Read more

Schematics

uploads2ftmp2f532ba10f-a58c-4a2c-9ac4-09c0719b9db72fimg_20190923_133239678_E8FkH9Zhuv.jpg

uploads2ftmp2f21bacd34-8de2-424e-ba24-dbb38b3370a82fimg_20190923_143124107_Pa8FHEgwVx.jpg

uploads2ftmp2f1e218f43-b273-4e70-b2cf-d5a60a45a8022fimg_20190923_122614035_XHPxhPZpYC.jpg

uploads2ftmp2f44896184-90a9-4597-9d7f-0bbe8257c90b2fimg_20190923_122626183_QFadaSqUFC.jpg

Code

Dunce Hat Code

JavaScript
You can upload this to Make Code
let value = 0
forever(function () {
    music.siren.loop()
    value = pins.A1.analogRead()
    if (value <= 500) {
        music.setVolume(0)
        light.showAnimation(light.theaterChaseAnimation, 500)
    } else {
        music.setVolume(255)
    }
})

Credits

Samory Forster

Samory Forster

4 projects • 0 followers

Comments