Celebrate and count your score!
One of the features of my final project is the "high five" count your score button. The student or teacher (aka user) presses the button once done with a challenge. The 7 Segment increments the score and the buzzer greets them with a joyful sound.
Tinkercad simulation to test the wiring and code
Arduino IDE to test the real components
Schematic generated by Tinkercad
When the Arduino receives a signal from the button, it modifies the variable (i) and plays the music note on the buzzer.
I wired the circuit on Tinkercad and checked the schematic to make sure it makes sense.
Once the (i) gets a new value, it changes the number displayed on the 7-segment.
Full circiuit wiring diagram
Suffering with tangled wires for a while
Trying to mount the components without having to rewire everything
And finally, the "don't touch until I film the FINAL PRODUCT" moment
Testing the system component by component
The intended behavior was that the buzzer and segment should work in parallel once the button is pressed. There was a long delay.
I asked our instructors and they said that is because I used the delay function in the code. They suggested using millis() instead. Mego mentioned in the project reviews as well that we can use Metro library. For now, I reduced the delay value and will search more about Metro for the final project :)
Discovering things by accident has a special taste. Just create an extra node and overlap the two nodes, Tinkercad will read it as a sharp edge.
Create sharp edges on Tinkercad, by accident!