Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch committed Dec 12, 2024
1 parent 35cfaa9 commit 54d5c93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions i2c_ads1115.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,13 @@ void i2c_ads1115_try_init() {
}
}

void i2c_ads1115_report() {
int16_t adc_raw = i2c_ads1115_sensor.getSingleConversion();
float voltage = adc_raw * resolution * calibration_factor;
//Serial.printf("Cal ADC:%.0f\n", adc_raw * calibration_factor);
//Serial.printf("Cal Voltage:%.2f mV\n", voltage);
//Serial.printf("Raw ADC:%d\n\n", adc_raw);
gen_nmea0183_xdr("$BBXDR,U,%.3f,V,VOLT", voltage / 1000); // Volt
}

#endif

0 comments on commit 54d5c93

Please sign in to comment.