The board I am using is the Heltec WiFi LoRa23 (V2) and yes, the Adafruit library uses the correct I2C pins for this board. I’ve used the same type of board and ADS1115 in an Arduino sketch and got no issues initializing the ADS1115. I’ve only run into this issue using this example in PlatformIO.
Serial monitor output below:
--- Terminal on COM3 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
E (158) ADC: adc1_lock�f�␖��͕�419): adc1 lock release called before acquire
LMIC library: MCCI
Interval: 60 seconds
Failed to initialize ADS.
Why are you calling this? LMIC-node already does.
It benefits to read the documentation.
My gut feeling says you have an I2C issue.
Have a look at file bsf_heltec_wifi_lora_32_v2.h for info about the board’s I2C pins.
Run an I2C scan sketch to see if the ADS is detected on the I2C bus. You can find an example here: i2c-scan-test It was written for an ESP8266 so you may need to tweak a few lines.
Be aware that the SCL and SDA pins are defined incorrectly (in the standard Arduino core) for your board. This is documented in above file.
Then have a look at ads.begin() in the ADS library source code and verify that it uses the correct I2C pins.