#include <stdio.h>
int main()
{
int i;
fprintf(stderr,"ERROR: failed to run rc_init_adc()\n");
return -1;
}
printf(" adc_0 |");
printf(" adc_1 |");
printf(" adc_2 |");
printf(" adc_3 |");
printf("DC_Jack|");
printf("Battery|");
printf("\n");
while(1){
printf("\r");
for(i=0;i<4;i++){
}
fflush(stdout);
}
return 0;
}
double rc_adc_dc_jack(void)
Reads the voltage of the 9-18v DC jack.
int rc_adc_init(void)
initializes the analog to digital converter for reading
int rc_adc_cleanup(void)
Cleans up the ADC subsystem.
double rc_adc_read_volt(int ch)
reads an adc voltage.
double rc_adc_batt(void)
reads the voltage of the 2-cell Lithium battery
void rc_usleep(unsigned int us)
Sleep in microseconds.