Connect - ESP32-S3FN8 and ADS115

Dear all,
I’m having a problem that may be simple, but I’m not making any progress. I connected an ADS1115 module to an ESP8266 without any problems, so I could use it with some analog sensors. It worked perfectly. Now I want to connect this to an ESP32 that comes in a kit with a LoRa and an OLED. It’s an ESP32-S3FN8 development board. I simply want to connect it to the ADS1115, but it’s not working. I don’t know where I’m going wrong. I’m sending you the pinout and an image of the ESP32 for guidance. Thank you.


TEST CODE

#include <Wire.h>
#include <Adafruit_ADS1X15.h>

const int SDA_PIN = 21;  // GPIO21
const int SCL_PIN = 18;  // GPIO18

Adafruit_ADS1115 ads;    // Ganancia por defecto +/-6.144V

void setup() {
  Serial.begin(115200);
  Wire.begin(SDA_PIN, SCL_PIN);

  if (!ads.begin(0x48)) {
    Serial.println("No se encontró ADS1115 en 0x48. Revisá cables/alimentación.");
    while (1) delay(10);
  }

  // Opcional: para señales de 0–3.3V, esta ganancia anda bien
  ads.setGain(GAIN_ONE); // ±4.096 V (1 bit ≈ 0.125 mV)
  Serial.println("ADS1115 OK. Leyendo A0 en single-ended...");
}

void loop() {
  int16_t raw = ads.readADC_SingleEnded(0); // Canal A0 del ADS1115
  float volts = raw * 0.125f / 1000.0f;      // 0.125 mV por bit con GAIN_ONE
  Serial.printf("A0: raw=%d  V=%.4f\n", raw, volts);
  delay(500);
}

SERIAL:
19:03:50.656 → ESP-ROM:esp32s3-20210327 19:03:50.656 → Build:Mar 27 2021 19:03:50.656 → rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT) 19:03:50.656 → SPIWP:0xee 19:03:50.656 → mode:DIO, clock div:1 19:03:50.656 → load:0x3fce2820,len:0x1180 19:03:50.697 → load:0x403c8700,len:0xc2c 19:03:50.697 → load:0x403cb700,len:0x311c 19:03:50.697 → entry 0x403c88b8 19:03:50.978 → Escaneando I2C… 19:03:51.025 → E (264) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.025 → E (269) i2c.master: I2C hardware timeout detected 19:03:51.025 → E (269) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.073 → E (332) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.120 → E (387) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.212 → E (442) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.258 → E (497) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.305 → E (552) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.351 → E (607) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.397 → E (662) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.490 → E (717) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.537 → E (772) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.582 → E (827) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.629 → E (882) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.675 → E (937) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.769 → E (992) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.816 → E (1047) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.862 → E (1102) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.909 → E (1157) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:51.955 → E (1212) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.001 → E (1267) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.095 → E (1322) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.147 → E (1377) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.188 → E (1432) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.235 → E (1487) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.281 → E (1542) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.375 → E (1597) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.421 → E (1652) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.466 → E (1707) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.512 → E (1762) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.558 → E (1817) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.650 → E (1872) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.700 → E (1927) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.746 → E (1982) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.789 → E (2037) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.835 → E (2092) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.881 → E (2147) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:52.973 → E (2202) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.019 → E (2257) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.065 → E (2312) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.113 → E (2367) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.158 → E (2422) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.251 → E (2477) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.298 → E (2532) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.345 → E (2587) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.390 → E (2642) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.436 → E (2697) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.527 → E (2752) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.573 → E (2807) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.620 → E (2862) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.666 → E (2917) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.713 → E (2972) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.804 → E (3027) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.850 → E (3082) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.897 → E (3137) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.943 → E (3192) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:53.995 → E (3247) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.037 → E (3302) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.130 → E (3357) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.177 → E (3412) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.223 → E (3467) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.270 → E (3522) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.315 → E (3577) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.407 → E (3632) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.454 → E (3687) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.499 → E (3742) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.546 → E (3797) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.591 → E (3852) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.683 → E (3907) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.731 → E (3962) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.778 → E (4017) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.824 → E (4072) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.871 → E (4127) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:54.917 → E (4182) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.008 → E (4237) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.055 → E (4292) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.102 → E (4347) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.148 → E (4402) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.194 → E (4457) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.286 → E (4512) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.332 → E (4567) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.379 → E (4622) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.425 → E (4677) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.472 → E (4732) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.564 → E (4787) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.612 → E (4842) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.657 → E (4897) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.703 → E (4952) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.750 → E (5007) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.797 → E (5062) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.890 → E (5117) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.936 → E (5172) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:55.982 → E (5227) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.027 → E (5282) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.074 → E (5337) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.172 → E (5392) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.213 → E (5447) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.260 → E (5502) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.306 → E (5557) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.353 → E (5612) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.447 → E (5667) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.493 → E (5722) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.541 → E (5777) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.586 → E (5832) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.634 → E (5887) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.682 → E (5942) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.772 → E (5997) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.818 → E (6052) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.864 → E (6107) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.911 → E (6162) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:56.957 → E (6217) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.050 → E (6272) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.096 → E (6327) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.142 → E (6382) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.189 → E (6437) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.235 → E (6492) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.283 → E (6547) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.375 → E (6602) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.421 → E (6657) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.466 → E (6712) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.512 → E (6767) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.559 → E (6822) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.650 → E (6877) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.697 → E (6932) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.743 → E (6987) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.793 → E (7042) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.836 → E (7097) i2c.master: probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up 19:03:57.883 → No se encontró nada :confused:

I’m a bit confused by your choice of pins.
According to the images you’ve provided, GPIO 18 isn’t actually made available as a pin on the board, but it does appear to be available as solder pad, along with GPIO17 near pin 26.
GPIO18 isn’t shown at all on the pinout map.

It might be helpful if you provided proper info on all the connections between the two boards, ad the status of the A0 address jumper on your sensor board.

BTW, when you post serial output to this forum please add triple backticks at the beginning and end of the data so that it displays correctly - in the same way that you have for your code.

Pete.