From b55d95896c5d33b655bb02d93de4ed2523e7b7ff Mon Sep 17 00:00:00 2001 From: "Wolfgang (Wolle) Ewald" Date: Fri, 14 May 2021 17:29:35 +0200 Subject: Update Alert_Window_Mode.ino --- examples/Alert_Window_Mode/Alert_Window_Mode.ino | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples/Alert_Window_Mode/Alert_Window_Mode.ino') diff --git a/examples/Alert_Window_Mode/Alert_Window_Mode.ino b/examples/Alert_Window_Mode/Alert_Window_Mode.ino index 2cc8c47..eb8aa77 100644 --- a/examples/Alert_Window_Mode/Alert_Window_Mode.ino +++ b/examples/Alert_Window_Mode/Alert_Window_Mode.ino @@ -18,8 +18,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(); -- cgit v1.2.3