summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de>2021-05-14 17:31:41 +0200
committerGitHub <noreply@github.com>2021-05-14 17:31:41 +0200
commit8dca802c64c754031c3905b47b25f37217f502bc (patch)
tree3e312bebe58d776687f60f41e3bb3730d51de063
parentUpdate Alert_Window_Mode.ino (diff)
downloadADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.tar
ADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.tar.gz
ADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.tar.bz2
ADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.tar.lz
ADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.tar.xz
ADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.tar.zst
ADS1115_WE-8dca802c64c754031c3905b47b25f37217f502bc.zip
-rw-r--r--examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino b/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino
index 8475fbb..046b583 100644
--- a/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino
+++ b/examples/Alert_Window_Mode_with_Latch/Alert_Window_Mode_with_Latch.ino
@@ -20,8 +20,14 @@ volatile int interruptPin = 2;
int ledPin = 10;
volatile bool outOfLimit = false;
-ADS1115_WE adc(I2C_ADDRESS);
-// ADS1115_WE adc = ADS1115_WE(); // Alternative: uses default address 0x48
+/* There are several ways to create your ADS1115_WE object:
+ * ADS1115_WE adc = ADS1115_WE() -> uses Wire / I2C Address = 0x48
+ * ADS1115_WE adc = ADS1115_WE(I2C_ADDRESS) -> uses Wire / I2C_ADDRESS
+ * ADS1115_WE adc = ADS1115_WE(&wire2) -> uses the TwoWire object wire2 / I2C_ADDRESS
+ * ADS1115_WE adc = ADS1115_WE(&wire2, I2C_ADDRESS) -> all together
+ * Successfully tested with two I2C busses on an ESP32
+ */
+ADS1115_WE adc = ADS1115_WE(I2C_ADDRESS);
void setup() {
Wire.begin();