NPS Music & Sound - Hybrid Computer Music & Percussion
  • Home
  • Der Stahlwald
  • Learn
Picture

An Easy Door Bell with Arduino Uno

3/5/2021

0 Comments

 
Making music with a microcontroller can be fun and simple! For this project, we're using a pushbutton to trigger a melody played over a piezo speaker, à la Kraftwerk, Pocket Calculator. I'm sure you remember how it goes, "by pressing down a special key it plays a little melody" (Karl Bartos, Ralf Hütter, Emil Schult, © Sony/ATV Music Publishing LLC, Warner Chappell Music, Inc.). The model here is more a faithful representation of a basic door bell, rather than a calculator. Simply push a button and a chime or melody will play.

For this project you will need:
1x Arduino Uno R3 microcontroller
1x breadboard
1x piezo speaker
1x pushbutton
1x resistor (10kΩ)
several jumper wires

Assemble the circuit in accordance with the diagram below:
Picture
Image: Nate Stottlemyer
Here's the code for you to hack (view content in browser to see code example). Lines 13 through 20 make up the melody. After each tone() function is called, a delay() function is used to determine the duration of the tone.
Try creating your own melody and have fun!
0 Comments

    WELCOME TO
    ​hybrid
    ​(computerMusic);

    hybrid(computerMusic); is a blog about musical creativity with digital and analog computing devices. Here you'll find tutorials and different projects I've written or assembled. In addition to content about musical creativity, you'll find additional projects that support musical thinking. Enjoy the content and enjoy trying and modifying the projects! Please comment and leave feedback, or contribute new ideas!

    Archives

    April 2021
    March 2021

    Categories

    All
    Arduino
    C++
    ChucK
    Eurorack
    Micro:bit
    Modular Synthesis
    Python
    Softube Modular
    VCV Rack
    Voltage Modular

    RSS Feed


Picture
Copyright © 2024 NPS Music & Sound
  • Home
  • Der Stahlwald
  • Learn