Skip to content

Commit

Permalink
Merge pull request #89 from caternuson/misc_volts
Browse files Browse the repository at this point in the history
Fix doc string and millivolts value in examples
  • Loading branch information
caternuson authored Feb 2, 2024
2 parents c7ae837 + a0eab26 commit 68fc55c
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 68fc55c

Please sign in to comment.