This commit is contained in:
Lea 2024-01-07 22:28:24 +01:00
parent 2ffe83f951
commit 0f7800d7e4
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

16
main.c
View file

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