In the old forum, I found this library for mongoose.
I tested the code in javascript. This is my code.
load("api_aws.js"); //aws
load("api_gcp.js");
load("api_gpio.js");
load("api_timer.js");
load("api_arduino_liquidcrystal_i2c.js");
//ERROR
LiquidCrystalI2C.create(addr, lcdColumns, lcdRows);
LiquidCrystalI2C.init()
LiquidCrystalI2C.setCursor(0, 1)
let D5 = 14;
let D8 = 15;
// BTN active rele
let BTND7 = 13;
let clicked = false;
GPIO.set_mode(D8, GPIO.MODE_OUTPUT);
let dht = DHT.create(D5, DHT.DHT11);
Timer.set(20000 /* milliseconds */, Timer.REPEAT, function () {
let t = dht.getTemp();
let h = dht.getHumidity();
if (isNaN(h) || isNaN(t)) {
print('Failed to read data from sensor');
return;
}
if (t >= 33) {
if (clicked !== true) { GPIO.write(D8, 0); }
}
else {
if (clicked !== true) { GPIO.write(D8, 1); }
}
//Send AWS
Shadow.update(0, { reported: { temperature: t, humidity: h } })
//ERROR
LiquidCrystalI2C.clear( )
LiquidCrystalI2C.setCursor( 0,0 )
LiquidCrystalI2C.print("Temp: " );
LiquidCrystalI2C.print("Temp: " + String(t) + (char)223 + "C" );
}, null);
The problem occurs only with the display.