Hello,
I’ve been working on a project with the Pimoroni Weatherhat and a Pi4b 2GB version. It’s been working well. I decided to use a Pi5b 2GB version and found it used a different GPIO setup. This I got through and it works. However, I noticed the screen on the weatherhat will change colour from black background to white for no reason and will not change back. It starts ok in black but after going to sleep then awakening the screen it becomes white. Same code was used in the Pi4b without issue. I’ve tried to code around it and it’s basically driving me nuts. Has anybody come across this issue?
Regards,
Brian
1 Like
Just having a wild guess and thoughts…
Screens normally will have some sort of local buffer, then that buffer is up-loaded.
If the screen was a 2 color b/w then my guess would have been that the buffer got wipes thus creating the alt color.
But I am assuming being on the Pi 5b, this is a full color screen, and not a smaller one used with uControllers. This makes me think the screen needs a re-init after sleep mode and this is not happening for some reason…
Any chance of a photo of the working screen you want and the one you dont want, as it may give hints to what the issue may be.
1 Like
Hi Michael,
I sorted the problem. The LCD was the screen on the Pimoroni PIM585 Weatherhat. It had been working fine on a Pi4b then I upgraded to a Pi5b where the GPIO operates differently. I was consulting with Chat-GPT on how to convert between the different GPIO’s which the solution was good. Problem was during editing my screen code and the associated backlight gpio chat GPT asked if I wanted the function optimised. I said yes which it did but inserted a bug. There was nothing wrong with the code other than older gpio. The so called optimised code introduced writing to LCD memory for sleep and wake mode. This worked but was randomly buggy causing the colour changes. So after ‘a week’ of trying to make the buggy code work I removed the sleep and wake mode codes and the screen works fine. I have used Chat-GPT to great advantage but one must proceed cautiously when using it and test, test, test again for every small step. All. Is well.
Regards,
Brian
1 Like
Good to hear you found the issue.
Personally Im not a big fan of any of these AIs unless you have the ability to debug and sanity check what it says. Often by that point you could have done it your self… Doing it yourself will build your knowledge and skill set, and over time you end up with your own libraries to tweak into any project in the future… at the expense of time today.
1 Like
Michael,
Partially agree. I treat AI like a smart manual. It’s helped with straight forward coding helping reduce time for development considerably. It helps structure code. So what I try to achieve is a framework of code that I will dive into for deeper understanding if necessary. I guide AI with what I want to achieve and often how i want to achieve it. It mostly works. Where it falls down is multiple slight tangents on replies, drifting so to speak. Others call it hallucination. Many times I’ve had to stop and reset back to a known point (a backup of code) and start a new conversation. Many times I have had to step in an take over as AI just doesn’t quiet get there. So, yes, one needs to have a deep understanding of coding in order to guide the AI (I’ve got a good idea with coding but am not a programmer as such. I was a Control System Engineer though). Across the weekend I’ve been adding the AI camera to my project in addition to a standard camera. So two cameras working together. Late last night AI and I finally got it going. I reset and started again several times with my most successful result was where I started a new conversation and chunked in over 3,000 lines of code and told AI to essential give me the minimum changes to make the two cameras work together and it did it. It’s not perfect as I note the AI stops working after about 15 minutes in one particular mode (motion tracking on an older Picamera ver 1.2 ($5)) and object detection. Probably a thread getting blocked. I may try asyncio again from this working code or eliminate the older camera altogether. I’ll be in touch. Thanks for your help.
Regards,
Brian
1 Like
Hi Guys
Just butting a bit here regarding “AI”
Recently was researching a new desktop Mac and came across the following classic which should have been very simple.
Pic of device which agrees with what I have in my hand. (not using yet)
On THE SAME PAGE we have this little “AI” box.
With a couple of prepared queries. I select “What ports are included”
Result
After a bit of “Thinking” and “Checking” we get the following.
Then I ask it to “List all ports on Mac mini M4”
Still hasn’t got it right
So I ask “Des it support Thunderbolt”
I suppose you could say it was getting closer.
I did not go any further as I thought I was straining “AI”'s capability a bit.
Don’t forget this is all on the same page with a representation of the product as it exists just above.
I was under the impression the “I” part of “AI” stood for “Intelligence”. If it does this example is not a very good look.
I think this would support Michael’s reluctance to believe a lot of it. I haven’t really used it consciously but after this little demo I would tend to treat it like some U Tube offerings. ie; Look very closely at what you see.
Cheers Bob
1 Like