Cut here for exception decoder

Hello guys, I hope you're doing well. When I add the ADS1115 code to my code, it shows me this error. What can I do with the ADS1115 code not working properly? Without the ADS1115 code, it works properly.

#define BLYNK_DEVICE_NAME ""
#define BLYNK_AUTH_TOKEN ""

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h> 
#include <BlynkSimpleEsp8266.h>
#include <Adafruit_ADS1X15.h>

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);

Adafruit_ADS1115 ads0;  
Adafruit_ADS1115 ads1; 
Adafruit_ADS1115 ads2;
Adafruit_ADS1115 ads3;

#include <DHT.h>


char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "";  // type your wifi name
char pass[] = "";  // type your wifi password

BlynkTimer timer;

#define DHTPIN D5 //Connect Out pin to D2 in NODE MCU
#define DHTTYPE DHT22  
DHT dht(DHTPIN, DHTTYPE);

int offset = 20;

void sendSensor()
{
  float hum = dht.readHumidity();
  float temp = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

  if (isnan(hum) || isnan(temp)) {
    Serial.println("Failed to read DHT sensor!");
    return;
  }

  int16_t adc0, adc1, adc2, adc3;

  adc0 = ads0.readADC_SingleEnded(0);
  int volt = adc0;
  double voltage = map(volt,0,1023, 0, 2500) +offset;
  voltage /=100;
  
//  float heat;
//  heat = ads0.readADC_SingleEnded(1);
//  heat = heat*0.48828125;
//  
//  float current = 0;
//  for(int i = 0; i< 1000; i++){
//    current = current +(.100 * ads0.readADC_SingleEnded(2) -25) / 100;
//    }
    

  // You can send any value at any time.
  // Please don't send more that 10 values per second.
    Blynk.virtualWrite(V0, temp);
    Blynk.virtualWrite(V1, hum);
    Blynk.virtualWrite(V2, voltage);
//    Blynk.virtualWrite(V3, current);
//    Blynk.virtualWrite(V4, heat);
    
    Serial.print("Temperature: ");
    Serial.print(temp);
    Serial.print("    Humidity: ");
    Serial.print(hum);
    Serial.print("    Voltage: ");
    Serial.print(voltage);
    Serial.print(" V");
//    Serial.print("    Heat: ");
//    Serial.print(heat);
//    Serial.print("    Current: ");
//    Serial.print(current);
//    Serial.println(" A");


  // Turn on the blacklight and print a message.
    lcd.setCursor(0, 0);
    lcd.print("Te:"); 
    lcd.print((float)temp);
    lcd.print(" H:");
    lcd.print((float)hum);
    lcd.setCursor(0, 1);
    
    lcd.print("Vo:");
    lcd.print((float)voltage);
//    lcd.print("  C:");
//    lcd.print((float)current);
//    lcd.setCursor(1, 1);
    delay(1000);
}


void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  Wire.begin();
  lcd.begin();
  lcd.backlight();
  ads0.begin();
  ads1.begin(0x49);
  ads2.begin(0x4a);
  ads3.begin(0x4b);
  
  Blynk.begin(auth, ssid, pass);
  dht.begin();
  timer.setInterval(1000L, sendSensor);
}

void loop() {
  // put your main code here, to run repeatedly:
  Blynk.run();
  timer.run();
}```

![llll|390x500](upload://mU9MHZHdMi2ZBOd3i5dMBHMpfT2.png)

Welcome to the forum

Please post the full text of the error message copied from the IDE using the "Copy error message" button and use code tags when you post it

Which Arduino and which version of the IDE are you using ?

What model ESP8266 are you using? I tried "Generic ESP8266 Module" and got some errors indicating that was the wrong guess. I switched to "NodeMCU 1.0 (ESP-12E Module)" and that worked a little better.

What "LiquidCrystal_I2C" library are you using? The one I have installed doesn't seem to be compatible with the one you need.

Arduino: 1.8.19 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

WARNING: library LiquidCrystal_I2C claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp8266 architecture(s).

In file included from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkWidgets.h:14,
                 from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h:107,
                 from /Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:6:
/Users/john/Documents/Arduino/libraries/Blynk/src/WidgetTimeInput.h: In constructor 'TimeInputParam::TimeInputParam(const BlynkParam&)':
/Users/john/Documents/Arduino/libraries/Blynk/src/WidgetTimeInput.h:45:43: warning: implicitly-declared 'constexpr BlynkTime& BlynkTime::operator=(const BlynkTime&)' is deprecated [-Wdeprecated-copy]
   45 |             mStart = BlynkTime(it.asLong());
      |                                           ^
In file included from /Users/john/Documents/Arduino/libraries/Blynk/src/WidgetTimeInput.h:15,
                 from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkWidgets.h:14,
                 from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h:107,
                 from /Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:6:
/Users/john/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkDateTime.h:65:5: note: because 'BlynkTime' has user-provided 'BlynkTime::BlynkTime(const BlynkTime&)'
   65 |     BlynkTime(const BlynkTime& t) : mTime(t.mTime) {}
      |     ^~~~~~~~~
In file included from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkWidgets.h:14,
                 from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h:107,
                 from /Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:6:
/Users/john/Documents/Arduino/libraries/Blynk/src/WidgetTimeInput.h:59:42: warning: implicitly-declared 'constexpr BlynkTime& BlynkTime::operator=(const BlynkTime&)' is deprecated [-Wdeprecated-copy]
   59 |             mStop = BlynkTime(it.asLong());
      |                                          ^
In file included from /Users/john/Documents/Arduino/libraries/Blynk/src/WidgetTimeInput.h:15,
                 from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkWidgets.h:14,
                 from /Users/john/Documents/Arduino/libraries/Blynk/src/BlynkSimpleEsp8266.h:107,
                 from /Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:6:
/Users/john/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkDateTime.h:65:5: note: because 'BlynkTime' has user-provided 'BlynkTime::BlynkTime(const BlynkTime&)'
   65 |     BlynkTime(const BlynkTime& t) : mTime(t.mTime) {}
      |     ^~~~~~~~~
/Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino: In function 'void sendSensor()':
/Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:45:17: warning: unused variable 'adc1' [-Wunused-variable]
   45 |   int16_t adc0, adc1, adc2, adc3;
      |                 ^~~~
/Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:45:23: warning: unused variable 'adc2' [-Wunused-variable]
   45 |   int16_t adc0, adc1, adc2, adc3;
      |                       ^~~~
/Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:45:29: warning: unused variable 'adc3' [-Wunused-variable]
   45 |   int16_t adc0, adc1, adc2, adc3;
      |                             ^~~~
/Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino: In function 'void setup()':
sketch_sep26a:106:13: error: no matching function for call to 'LiquidCrystal_I2C::begin()'
  106 |   lcd.begin();
      |             ^
In file included from /Users/john/Documents/Arduino/sketch_sep26a/sketch_sep26a.ino:10:
/Users/john/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:58:8: note: candidate: 'void LiquidCrystal_I2C::begin(uint8_t, uint8_t, uint8_t)'
   58 |   void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS );
      |        ^~~~~
/Users/john/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:58:8: note:   candidate expects 3 arguments, 0 provided
exit status 1
no matching function for call to 'LiquidCrystal_I2C::begin()'


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.