diff options
-rw-r--r-- | examples/Auto_Range/Auto_Range.ino | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/Auto_Range/Auto_Range.ino b/examples/Auto_Range/Auto_Range.ino index 8b0da2b..7813658 100644 --- a/examples/Auto_Range/Auto_Range.ino +++ b/examples/Auto_Range/Auto_Range.ino @@ -130,25 +130,23 @@ void setup() { }
void loop() {
- float voltage = 0.0;
-
Serial.print("Channel 0 - ");
- voltage = readChannel(ADS1115_COMP_0_GND);
+ readChannel(ADS1115_COMP_0_GND);
Serial.print("Channel 1 - ");
- voltage = readChannel(ADS1115_COMP_1_GND);
+ readChannel(ADS1115_COMP_1_GND);
Serial.print("Channel 2 - ");
- voltage = readChannel(ADS1115_COMP_2_GND);
+ readChannel(ADS1115_COMP_2_GND);
Serial.print("Channel 3 - ");
- voltage = readChannel(ADS1115_COMP_3_GND);
+ readChannel(ADS1115_COMP_3_GND);
Serial.println("-------------------------------");
delay(1000);
}
-float readChannel(ADS1115_MUX channel) {
+void readChannel(ADS1115_MUX channel) {
float voltage = 0.0;
adc.setCompareChannels(channel);
|