diff --git a/main.c b/main.c index ea8d71a..90c3384 100644 --- a/main.c +++ b/main.c @@ -90,16 +90,16 @@ void main() { ADC_Setup(); TIMER_Setup(); - long rows = sizeof(notes) / sizeof(notes[0]); + //long rows = sizeof(notes) / sizeof(notes[0]); while (true) { - for (int i = 0; i < rows; i++) { - play_note(notes[i][0], notes[i][1], notes[i][2]); - } + //for (int i = 0; i < rows; i++) { + // play_note(notes[i][0], notes[i][1], notes[i][2]); + //} - //uint16_t value = ADC_Read_Avg(0, 4); - //speaker_disabled = value == 0; - //if (value < 100) value = 100; // Anything lower than this causes issues - //tick_timer_start = 0xffff - (F_CPU / value / 1000); + uint16_t value = ADC_Read_Avg(0, 4); + speaker_disabled = value == 0; + if (value < 100) value = 100; // Anything lower than this causes issues + tick_timer_start = 0xffff - (F_CPU / value / 1000); } }