Salut, eroarea pe care o primesti este din cauza folosirii gresite a librariei LiquidCrystal_I2C.h. Mai precis:
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); --> asta nu exista in libraria LiquidCrystal_I2C si nici in libraria LiquidCrystal
Daca folosesti un afisor LCD tip16x2 si are adaptorul I2C cu PCF8574(A) corect ar fi fost:
LiquidCrystal_I2C lcd(0x27, 16,2);
Daca in schimb folosesti acelasi tip de afisor dar fara adaptorul I2C, corect ar fi sa folosesti asta:
The sketch will not 'compile'. I did read/recover the the I2C address as 0x27. I changed the I2C address in the sketch but the error message remains the same.
I am lost as to what the 'machine' is trying to tell me. I am about ready to start deleting all 'Library' files and start over.
<<<<<<<<<<<<<<<<from IDE>>>>>>>>>>>>>>>>>>>>>>>>>
/* LCD Display with I2C Interface Demo lcd-i2c-demo.ino Use NewLiquidCrystal Library DroneBot Workshop 2018 //dronebotworkshop.com */
// Include Wire Library for I2C
include <Wire.h>
// Include NewLiquidCrystal Library for I2C
include <LiquidCrystal_I2C.h>
// Define LCD pinout const int en = 2, rw = 1, rs = 0, d4 = 4, d5 = 5, d6 = 6, d7 = 7, bl = 3;
// Define I2C Address - change if reqiuired const int i2c_addr = 0x3F;
LiquidCrystal_I2C lcd(i2c_addr, en, rw, rs, d4, d5, d6, d7, bl, POSITIVE);
void setup()
Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Uno"
lcd-i2c-demo:20:65: error: 'POSITIVE' was not declared in this scope
LiquidCrystal_I2C lcd(i2c_addr, en, rw, rs, d4, d5, d6, d7, bl, POSITIVE);
^~~~~~~~
Multiple libraries were found for "Wire.h" Used: C:\Program Multiple libraries were found for "LiquidCrystal_I2C.h" Used: C:\Working Not used: C:\Working exit status 1 'POSITIVE' was not declared in this scope
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
2020-01-04 4:32 am
@Bob,
Are you using the exact same display as per Bill's article? In his article he also provides alternative configuration details for the LCD object.
Sometimes one error can cause a flow on of misleading errors too.
I'm unable to test it right now, but you may well have an new and older version of the library which doesn't declare the POSITIVE variable. Check for which libraries you have installed, and maybe even try to update them via the IDE.
(@zeferby)
Member
Joined: 4 years ago
Posts: 355
(@bob)
Member
Joined: 5 years ago
Posts: 2
2020-01-04 2:27 pm
@zeferby @frogandtoad
Great to see you offering support. You had both replied to @bob, which is actually my "nicename". The poster's "nicename" is under their name inside brackets and is currently in smaller grey type.
I'm sure @tek6420 probably received notification of your replies anyway, but just in case I have mentioned him here.
Just a suggestion Bill, but going with slightly larger type and switching the grey to something a little more eye catching might help to make the "nicename" a bit more obvious. Keep up the great work!!
. wpf-author-nicename { color:
034190;
font-size: 13px; }
(@zeferby)
Member
Joined: 4 years ago
Posts: 355
(@tek6420)
Member
Joined: 4 years ago
Posts: 5
Topic starter 2020-01-04 3:49 pm
I took my problem into the 'fart sack' last evening to give same some additional thought. This morning I focused on the IDE 'advisory' "Multiple libraries were found for "Wire.h" Used: C:\Program Multiple libraries were found for "LiquidCrystal_I2C.h" Used: C:\Working" and deleted all 'Library' files in the C:\Program directory.
I am now happy to state that the 'lcd-ic2-demo' project is working fine. The only change I had to make original 'ino' file was to change the I2C address to 0x27, the address of my specific I2C device.
I still do not understand the meaning of the IDE advisory "exit status 1 'POSITIVE' was not declared in this scope". I expect that I will understand these statements as I gain experience.
What I learned from this experience; Do not install library files unless same are needed.
(@zeferby)
Member
Joined: 4 years ago
Posts: 355
2020-01-04 4:32 pm
What I learned from this experience; Do not install library files unless same are needed.
This is one of the reasons why I more and more like platform.io : the ability to add libs for one project only
Eric
(@duce-robot)
Member
Joined: 5 years ago
Posts: 672
2020-01-07 1:02 am
Yes I have been here those libraries are a stickler the right library will solve it. ? in fact I'm still rebuilding my lib vault because I had to wipe my old one because of this .
(@walkergw)
Member
Joined: 5 years ago
Posts: 1
2020-08-25 12:10 am
@tek6420
I am having the SAME Identical problem. Oddly, these sketches worked fine 2 years ago. For a multitude of reasons, I had to let these projects languish. But, I come back now and I get these "POSITIVE" errors. What exactly did you do to solve this??