bleh
This commit is contained in:
parent
2ffe83f951
commit
0f7800d7e4
16
main.c
16
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue