uint16_t offset
Sonar offset in ADC units.
void sonar_adc_init(void)
struct SonarAdc sonar_adc
void sonar_adc_read(void)
Read ADC value to update sonar measurement.
uint16_t meas
Raw ADC value.
float distance
Distance measured in meters.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.