summaryrefslogtreecommitdiffstats
path: root/examples/Auto_Range
diff options
context:
space:
mode:
authorWolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de>2021-09-16 19:30:42 +0200
committerGitHub <noreply@github.com>2021-09-16 19:30:42 +0200
commitc82c3f57e98814652896442c9ba8dabd2378b582 (patch)
tree47e9dfc8b25b9dcfab45793b19d2a8dda196b60d /examples/Auto_Range
parentUpdate library.properties (diff)
downloadADS1115_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
Diffstat (limited to 'examples/Auto_Range')
-rw-r--r--examples/Auto_Range/Auto_Range.ino12
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);