Issue with liquid crystal and ads1115

Hi everyone.
I did a montage with esp32 + ADS1115 and liquid crystal as this exemple from thissite :


However my display stills freezen. Datas are not. However i know that the adress stills reconized : 0x24 for display and 0x48 for ads. And Yes, i see inside serial monitor
Also as mentioned by this site i used :

his design adheres to the standard connection protocol for the ADS1115 chip. It features 10K ohm pull-up resistors on both the I2C and Alert pins, as well as a 1uF capacitor situated between the VDD and GND pins, functioning as a decoupling capacitor.

Could you tell me if the issue is that ads 1115 takes all the memory? is that as i used the same pins for two differents devices, there's a conflict? If you could tell me the solutions :slight_smile: thanks

The code here :

#include <Adafruit_ADS1X15.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
Adafruit_ADS1115 ads;  /* Use this for the 16-bit version */
//Adafruit_ADS1015 ads;     /* Use this for the 12-bit version */
 
void setup(void)
{
  Serial.begin(115200);
 
  Serial.println("Getting single-ended readings from AIN0..3");
  Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV/ADS1015, 0.1875mV/ADS1115)");
 
  // The ADC input range (or gain) can be changed via the following
  // functions, but be careful never to exceed VDD +0.3V max, or to
  // exceed the upper and lower limits if you adjust the input range!
  // Setting these values incorrectly may destroy your ADC!
  //                                                                ADS1015   ADS1115
  //                                                                -------  -------
  // ads.setGain(GAIN_TWOTHIRDS);  // 2/3x gain +/- 6.144V  1 bit = 3mV      0.1875mV (default)
  // ads.setGain(GAIN_ONE);        // 1x gain   +/- 4.096V  1 bit = 2mV      0.125mV
  //ads.setGain(GAIN_TWO);        // 2x gain   +/- 2.048V  1 bit = 1mV      0.0625mV
  // ads.setGain(GAIN_FOUR);       // 4x gain   +/- 1.024V  1 bit = 0.5mV    0.03125mV
  // ads.setGain(GAIN_EIGHT);      // 8x gain   +/- 0.512V  1 bit = 0.25mV   0.015625mV
  // ads.setGain(GAIN_SIXTEEN);    // 16x gain  +/- 0.256V  1 bit = 0.125mV  0.0078125mV
 
  lcd.init();
  lcd.backlight();
  if (!ads.begin())
  {
    Serial.println("Failed to initialize ADS.");
    while (1);
  }
}
 
void loop(void)
{
  int16_t adc0, adc1, adc2, adc3;
  float volts0, volts1, volts2, volts3;
 
  adc0 = ads.readADC_SingleEnded(0);
  adc1 = ads.readADC_SingleEnded(1);
  adc2 = ads.readADC_SingleEnded(2);
  adc3 = ads.readADC_SingleEnded(3);
 
  volts0 = ads.computeVolts(adc0);
  volts1 = ads.computeVolts(adc1);
  volts2 = ads.computeVolts(adc2);
  volts3 = ads.computeVolts(adc3);
 
  Serial.println("-----------------------------------------------------------");
  Serial.print("AIN0: "); Serial.print(adc0); Serial.print("  "); Serial.print(volts0); Serial.println("V");
  Serial.print("AIN1: "); Serial.print(adc1); Serial.print("  "); Serial.print(volts1); Serial.println("V");
  Serial.print("AIN2: "); Serial.print(adc2); Serial.print("  "); Serial.print(volts2); Serial.println("V");
  Serial.print("AIN3: "); Serial.print(adc3); Serial.print("  "); Serial.print(volts3); Serial.println("V");
 
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("ADC0:");
  lcd.print(adc0);
  lcd.print("  ");
  lcd.print(volts0);
  lcd.print("V");
 
  lcd.setCursor(0, 1);
  lcd.print("ADC1:");
  lcd.print(adc1);
  lcd.print("  ");
  lcd.print(volts1);
  lcd.print("V");
  delay(1000);
}

So, if it compiles and uploads, do you see any serial output in the Serial Monitor?

yes, i do inside serial monitor

SDA and SCL lines connected to the correct pins on the LCD? Not reversed?

no! the display is on ( light) but no datas!

Have you tested both these devices separately?

yes!

Worse. Diagram unreadable, but almost looks like Data to power, power to data on the LCD. Need a better image to trust that, though.
@aydlinn can you actually read the pin designations on that diagram on your screen? I cannot.

I don't like the clear() call in loop, but I commented out the ads1115 stuff and your code runs and displays on my LCD.

Hi. Yes " Firstly, connect the VDD and GND Pin of the module to the 3.3V and GND Pin of the ESP32, respectively. Next, connect the ADS1115 I2C pins (SDA and SCL) to the I2C pins (SDA=GPIO21 and SCL=GPIO22) of the ESP32. The ADDR pin of the chip should be connected to either VDD, SDA, or SCL, depending on which of the addresses 0x49, 0x4A, or 0x4B you wish to use. Note that the ADDR pin is pulled down to the ground by a 10K resistor by default."

hi could you send me the picture of your montage. May be this?

Wasn't asking you to read it to me, rather asking if you have a better image. I'd rather have a schematic, of course, but if you're going to present an image for a substitute, at least ensure the image will be readable. I cannot read the pin labels in that diagram, so it is useless.

go to this website : How to use ADS1115 16-Bit ADC Module with ESP32

My LCD states the working voltage is 5v. What are you feeding it?

with the vin pin of esp32




Have you run the i2c scanner sketch?
LCD should show 0x27

Seems to be using the ESP32 Vin for Vcc for the LCD

yes i get it!

Have you adjusted the pot on the LCD driver? I think that is backlight brightness. Maybe too high?