Irrigation Controller sketch 1.6.8
Trying to compile the sketch I've found the following error. I tried to solve this, updating the LiquidCrystal_I2C library and defining "POSITIVE" but it was unsuccessful.
Could anyone help me?
Thanks very much!
Arduino:1.6.8 (Windows 10), Tarjeta:"Arduino/Genuino Uno"
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address to 0x27
C:\Program Files (x86)\Arduino\examples\IrrigationController\IrrigationController.ino: In function 'void setup()':
IrrigationController:185: error: no matching function for call to 'LiquidCrystal_I2C::begin(int, int)'
lcd.begin(16, 2); //(16 characters and 2 line display)
C:\Program Files (x86)\Arduino\examples\IrrigationController\IrrigationController.ino:185:18: note: candidate is:
In file included from C:\Program Files (x86)\Arduino\examples\IrrigationController\IrrigationController.ino:88:0:
C:\Program Files (x86)\Arduino\libraries\Arduino-LiquidCrystal-I2C-library-master/LiquidCrystal_I2C.h:76:7: note: void LiquidCrystal_I2C::begin()
C:\Program Files (x86)\Arduino\libraries\Arduino-LiquidCrystal-I2C-library-master/LiquidCrystal_I2C.h:76:7: note: candidate expects 0 arguments, 2 provided
'POSITIVE' was not declared in this scope
@nicorodri Did you ever get this figured out, and if so, do you remember what the fix was? I'm new to this and have the same problem. I'm embarrassed to say how many weeks I have been trying to get this code to compile.
Where did you get the sketch? What lcd library are you using and what version? What arduino ide version do you have?
Thank you for getting back to me. I'm using version 1.8.2 Arduino IDE and I got the sketch from the mysensors build section. The LCD library is LiqiudCrystal_I2C. I'm pretty sure my problem has to do with version incompatibility. I just don't know where to find everything that is supposed to work together.
try changing the line with
LiquidCrystal_I2C lcd(0x27, 16, 2);
or change the 16 with a 20 if you have the 20 characters long lcd and check if the I2C address 0x27 is actually correct
I'll try that this afternoon when I can get back to it. thanks again!
Also, it looks like the LiquidCrystal_I2C library version is 1.3.4.
I have used the library I found in Library Manager and it is versione 1.1.2, so it may be different from yours. You need to check in the library examples on how to initiate the LCD if it doesn't work
Ok. Thanks for your time. I will give your suggestions a try and keep plugging away at this.