From c82c3f57e98814652896442c9ba8dabd2378b582 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Wolle) Ewald" Date: Thu, 16 Sep 2021 19:30:42 +0200 Subject: Add files via upload --- examples/Auto_Range/Auto_Range.ino | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'examples/Auto_Range/Auto_Range.ino') 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); -- cgit v1.2.3