Error:
exit status 1
'int LiquidCrystal_I2C::init()' is private within this context
Code here:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "DHT_NEW.h"
DHT _dht1;
LiquidCrystal_I2C _lcd1(0x27, 16, 2);
int _dispTempLength1=0;
boolean _isNeedClearDisp1;
LiquidCrystal_I2C _lcd2(0x27, 16, 2);
int _dispTempLength2=0;
boolean _isNeedClearDisp2;
unsigned long _dht1LRT = 0UL;
unsigned long _dht1Tti = 0UL;
int _disp1oldLength = 0;
int _disp2oldLength = 0;
void setup()
{
Wire.begin();
delay(10);
_lcd2.init();
_lcd2.backlight();
_lcd1.init();
_lcd1.backlight();
_dht1.setup(4);
_dht1LRT = millis();
_dht1Tti = millis();
}
void loop()
{
if (_isNeedClearDisp2)
{
_lcd2.clear();
_isNeedClearDisp2= 0;
}
if (_isNeedClearDisp1)
{
_lcd1.clear();
_isNeedClearDisp1= 0;
}
//Плата:1
if(_isTimer(_dht1Tti, 500.0))
{
if(_isTimer(_dht1LRT,(_dht1.getMinimumSamplingPeriod())))
{
_dht1.readSensor();
_dht1LRT = millis();
_dht1Tti = millis();
}
}
if (!(0))
{
_dispTempLength2 = ((((String("h:")) + ((_floatToStringWitRaz(_dht1.humidity,2)))))).length();
if (_disp2oldLength > _dispTempLength2)
{
_isNeedClearDisp2 = 1;
}
_disp2oldLength = _dispTempLength2;
_lcd2.setCursor(int((16 - _dispTempLength2)/2), 1);
_lcd2.print((((String("h:")) + ((_floatToStringWitRaz(_dht1.humidity,2))))));
}
else
{
if (_disp2oldLength > 0)
{
_isNeedClearDisp2 = 1;
_disp2oldLength = 0;
}
}
if (!(0))
{
_dispTempLength1 = ((((String("t:")) + ((_floatToStringWitRaz(_dht1.temperature,2)))))).length();
if (_disp1oldLength > _dispTempLength1)
{
_isNeedClearDisp1 = 1;
}
_disp1oldLength = _dispTempLength1;
_lcd1.setCursor(int((16 - _dispTempLength1)/2), 0);
_lcd1.print((((String("t:")) + ((_floatToStringWitRaz(_dht1.temperature,2))))));
}
else
{
if (_disp1oldLength > 0)
{
_isNeedClearDisp1 = 1;
_disp1oldLength = 0;
}
}
}
String _floatToStringWitRaz(float value, int raz)
{
return String(value,raz);
}
bool _isTimer(unsigned long startTime, unsigned long period)
{
unsigned long currentTime;
currentTime = millis();
if (currentTime>= startTime)
{
return (currentTime>=(startTime + period));
}
else
{
return (currentTime >=(4294967295-startTime+period));
}
}