# 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-28_notes.jpg) ## 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 ## 2024-04-03 - other speakers sold on DigiKey have more stable frequency response graphs where the volume does not fluctuate very much compared to the speaker included in the kit - those speakers however use sine waves instead of square waves, so our first step should be focused on figuring out how to send sine waves at certain frequencies, perhaps with fast PWM ## 2024-04-09 - Asked Sam how to use PWM to handle no use of DAC. - Test the new speaker on Friday without DAC to see if it sounds okay enough. - Lets Try and talk to Rashid or other EE professors. - I think we should also try and get a DAC from the Lab! - We looked into how to use the shift register to handle the fact that we have to many buttons for the pins on the Uno. - We can ask same for a shift register. - We looked into how to use the LCD display and got some Pseudo code from GPT to help.