Update main.c use variables, divide by 10

beta-add
Alan Johnston 2 years ago committed by GitHub
parent 9388650d72
commit dd03d5d1f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2189,7 +2189,7 @@ void read_adc()
write(file, config, 1);
sleep(1);
long int time_start;
long int time_start, time_stop;
int i = 0;
time_start = (long int) micros(); //millis();
@ -2210,6 +2210,7 @@ void read_adc()
// printf("Digital value of analog input: %d in %d us\n", raw_adc, micros() - time_start); // millis() - time_start);
}
}
printf("Digital value of analog input: %d in %d us\n", raw_adc, micros() - time_start); // millis() - time_start);
time_stop = micros();
printf("Digital value of analog input: %d in %d us\n", raw_adc, (time_stop - time_start)/10.0); // millis() - time_start);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.