fix analog input

This commit is contained in:
PoliEcho 2026-04-24 18:27:29 +02:00
parent c515c1e07e
commit 5c6a687471
2 changed files with 3 additions and 2 deletions

3
main.c
View File

@ -61,7 +61,8 @@ void core1_main(void) {
while (1) {
update_buttons();
update_inputs();
printf("vco_mode: %d, quant_enabled: %d amen_enabled: %d", state.vco_mode,state.quant_enabled,state.amen_enabled);
printf("vco_mode: %d, quant_enabled: %d amen_enabled: %d\n", state.vco_mode,state.quant_enabled,state.amen_enabled);
printf("clock_bpm: %f\n",state.clock_bpm);
sleep_ms(1);
}
}

2
mux.c
View File

@ -19,7 +19,7 @@ void update_inputs() {
for(uint8_t j = 0; j < 8;j++) {
set_mux_addr(j);
sleep_ms(1); // let multiplexor multiplex
state.array[(i+1)*j]= adc_read();
state.array[i*8 + j]= adc_read()/4096.0f;
}
}
}