Skip to content

Commit

Permalink
fix doc string and millivolts
Browse files Browse the repository at this point in the history
  • Loading branch information
caternuson committed Feb 2, 2024
1 parent c7ae837 commit a0eab26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Adafruit_ADS1X15.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int16_t Adafruit_ADS1X15::getLastConversionResults() {

/**************************************************************************/
/*!
@brief Returns true if conversion is complete, false otherwise.
@brief Compute volts for the given raw counts.
@param counts the ADC reading in raw counts
Expand Down
2 changes: 1 addition & 1 deletion examples/continuous/continuous.ino
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void loop(void)

int16_t results = ads.getLastConversionResults();

Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)); Serial.println("mV)");
Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)/1000); Serial.println("mV)");

new_data = false;

Expand Down
2 changes: 1 addition & 1 deletion examples/nonblocking/nonblocking.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void loop(void)

int16_t results = ads.getLastConversionResults();

Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)); Serial.println("mV)");
Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(ads.computeVolts(results)/1000); Serial.println("mV)");

// Start another conversion.
ads.startADCReading(ADS1X15_REG_CONFIG_MUX_DIFF_0_1, /*continuous=*/false);
Expand Down

0 comments on commit a0eab26

Please sign in to comment.