Notifications
Clear all

I2C lcd screen problem

5 Posts
2 Users
0 Likes
207 Views
Fritigern
(@fritigern)
Eminent Member
Joined: 1 year ago
Posts: 27
Topic starter  

I am re downloading the libraries after trashing the ide and reinstalling it to make it work.

So testing that I have the right LiquidCrystal library I loaded up a sketch that is at this moment running a thermometer in the kitchen.

When I compiled it today the IDE reported an error it never reported in the past.

So I downloaded the dronebot test sketch for i2c and LCD 1602 display. And again my IDEs both report that it is faulty. IDE 1.8.19 and 2.0.1

See screenshot of what the IDE now thinks Bill got wrong.

Can anybody explain why the Arduino IDE should have kept the error a secret for four years?

And why it should choose today to see the light and fail the compiling of the sketch?

And why a little gizmo containing the error is still displaying a message on a LCD screen via I2C as I type?

Apple iMac with OS12 Monterey, but behaving more like Windows Vista every day.

Fritigern

Screenshot 2022 10 02 at 15.56.33

 


   
Quote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 4015
 

@fritigern Did you change your compiler messages to ALL? That is step 1 ALWAYS!

We have seen this error before. Change the code to look like what is outlined in this post HERE

I don't recall if that is all that is needed, if not then check the Nerds, they usually can provide a working example.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 4015
 

@fritigern Also note Bill has updated the Resources section to indicate some deletions. Not sure if that breaks all the sketches he wrote or if there are workarounds. I will try to confirm.

Screen Shot 2022 10 02 at 09.32.57

 

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 4015
 

@fritigern I confirmed that the fix I told you about earlier does in fact fix the problem.

Also, to answer your questions.

1. 'kept the error a secret'. It didn't, at some point the library was made obsolete so the next time you compiled it threw an error. Normal and expected behaviour.

2. See 1.

3. Not sure what you are talking about or if it is unusual, everything looks normal to me.

When Bill became aware of the problem, he updated the resources (see pic). The learning in the video doesn't change, only some minor organizational elements and syntax. Bill does not spoon feed, you are expected to do some of the work.

Here is the fix once more 

//LiquidCrystal_I2C lcd(i2c_addr, en, rw, rs, d4, d5, d6, d7, bl, POSITIVE);
LiquidCrystal_I2C lcd(i2c_addr, 16, 2);

ANYWAY, I gave you the one line fix, have a good day!

Screen Shot 2022 10 02 at 09.32.57

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
Fritigern
(@fritigern)
Eminent Member
Joined: 1 year ago
Posts: 27
Topic starter  

@Ron

Thank you very much for taking the time to reply to my rant, and supplying the fix.

So the original Bill- based sketch worked fine until I updated the libraries on the computer. And the reference to POSITIVE was in one of the superseded libraries. Doh!

And, the fix works for me too.

Ta

Fritigern


   
ReplyQuote