fix analog input
This commit is contained in:
parent
c515c1e07e
commit
5c6a687471
3
main.c
3
main.c
@ -61,7 +61,8 @@ void core1_main(void) {
|
|||||||
while (1) {
|
while (1) {
|
||||||
update_buttons();
|
update_buttons();
|
||||||
update_inputs();
|
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);
|
sleep_ms(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2
mux.c
2
mux.c
@ -19,7 +19,7 @@ void update_inputs() {
|
|||||||
for(uint8_t j = 0; j < 8;j++) {
|
for(uint8_t j = 0; j < 8;j++) {
|
||||||
set_mux_addr(j);
|
set_mux_addr(j);
|
||||||
sleep_ms(1); // let multiplexor multiplex
|
sleep_ms(1); // let multiplexor multiplex
|
||||||
state.array[(i+1)*j]= adc_read();
|
state.array[i*8 + j]= adc_read()/4096.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user