mirror of
https://codeberg.org/eel4746_piano/avr_piano.git
synced 2024-11-22 09:10:30 -05:00
1.4 KiB
1.4 KiB
Notes
Plan
- Test speaker without Arduino
- can be done by using a function generator and 3.3V square wave with variable frequency
- Write AVR C code to generate a square wave of varying frequency via Timer1
- Timer1 is used so that a pre-scalar and its calculations don't need to be done
- Use a table/array that stores frequencies and the indices correspond to the buttons on the sound board
- Create buffers to add recording/saving/playing functionality
- the buffers are a sequence of notes (which are the indices of the previous table) that is terminated by some other byte
- Figure out how the LCD in the starter kit is programmed
- Show the current and surrounding notes in the currently selected buffer (or the note of the soundboard button that was just pressed)
- Add a menu on the second row to select the memory buffer (maybe 1-5)
- it is controlled by left and right buttons
2024-03-28
2024-03-30
- the speaker was tested with a function generator (from the EspoTek Labrador) outputting a square wave of varying frequency
- it is painful above a frequency of 12 kHz and just creates clicks below 30 Hz
- it is louder at certain frequencies and quieter at others, and this is not a linear relationship
- the speaker's datasheet has a graph of this which can be used to adjust the speaker's volume at the problematic frequencies