diff options
author | Wolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de> | 2021-09-16 19:30:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-16 19:30:42 +0200 |
commit | c82c3f57e98814652896442c9ba8dabd2378b582 (patch) | |
tree | 47e9dfc8b25b9dcfab45793b19d2a8dda196b60d | |
parent | Update library.properties (diff) | |
download | ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.tar ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.tar.gz ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.tar.bz2 ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.tar.lz ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.tar.xz ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.tar.zst ADS1115_WE-c82c3f57e98814652896442c9ba8dabd2378b582.zip |
-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);
|