/Designs/galileo_experiment/SW/main.c
46,12 → 46,9
enable_interrupts(GLOBAL);
setup_adc_ports(AN0_TO_AN2|VSS_VREF);
setup_adc(ADC_CLOCK_DIV_64);
setup_adc(ADC_CLOCK_DIV_32);
 
usb_init(); // initialise USB module
 
while (TRUE)
{
while(!usb_cdc_connected());
time=0;
85,5 → 82,4
// odesli namerene hodnoty
printf(usb_cdc_putc, "%7.3f %4.3f %4.3f %4.3f %4.3f %4.3f %4.3f \n\r",((time << 16) + get_timer0())/15625.0, xavg, quadraticerror(xavg,x,BUFLEN), yavg, quadraticerror(yavg,y,BUFLEN), zavg, quadraticerror(zavg,z,BUFLEN)); //konstanta k je kvuli prevodu do rozzumnych jednotek [s]
}
}
}