SKETCH
DOCUMENTATION PROCESS
First step: Design the Input
There must be some way for a person to "activate" the doorbell
I decided to use light-sensing codes to make the circuitboard sensitive to light as input.
There must be some way for a person on the "other side" to be notified that the doorbell has been activated
I want to make the circuitboard play a song named "knock knock" to notify a person in the other side.
Second step: Modify the music notes part
I found the music sheet of "knock knock" by Twice online, and then I followed a tutorial define all the notes I needed in Arduino. https://www.arduino.cc/en/Tutorial/BuiltInExamples/toneMelody
The measures I used are "gfgfgfgbb gfgfgfgbb gggggdddgggggddd", and I the I worte the "int beats [ ]" part following the rythm of these four measures. I defined the tempo as 100.
Third step: Modify the light senseing part
This part was relatively easy for me, as I only needed to change the codes provided in class to set neopixels to when there is light to notify people there's a doorbell, and clear neopixels when the light value is too low. So I picked a color tha I liked and made two pixels as two eyes of the bunny.
if (lightValue > 60){
Serial.print("if");
CircuitPlayground.setPixelColor(1, 251, 206, 177);
CircuitPlayground.setPixelColor(6, 251, 206, 177);
}
else {
CircuitPlayground.playTone(frequency, duration, false);
delay(duration + duration/16);
CircuitPlayground.clearPixels();
}
Forth Step: think of the structural component
I faced some failures here. I originally wanted to cover the my doorbell with felt. However, after cutting the felt into pieces, I found out that they couldn't fit perfectly and looked very ugly. :(
So I decided to just make two rabbit ears for the card box to make the doorbell look like an adorable bunny!
Fifth step: Success!
FINAl CODES