Inkplate-Arduino-library icon indicating copy to clipboard operation
Inkplate-Arduino-library copied to clipboard

display.drawImage() messes up memory in OpenWeather_Station example

Open dogerber opened this issue 1 year ago • 4 comments

Hi,

The example supplied in examples/Inkplate10/Projects/Inkplate10_OpenWeather_Station.ino is broken. When run as supplied it shows only one preview image of the weather condition and ignores the rest (the code still runs though).

I was able to pin-point it to this line: https://github.com/SolderedElectronics/Inkplate-Arduino-library/blob/cbb736fc72e2adddcfdcfa80cec47b7029a8c8ae/examples/Inkplate10/Projects/Inkplate10_OpenWeather_Station/Inkplate10_OpenWeather_Station.ino#L387

when display.drawImage(Output, dayPos + 10, dayOffset, true, true); is called, something happens to OWOC, such that all fields containing strings get corrupted. This can be checked by printing Serial.println(OWOC.forecast[day].icon) before and after the above mentioned line. Before it will be find, afterwards it will be corrupted.

I do not understand these things enough to fix them and would be happy if someone has an idea.

dogerber avatar Nov 08 '23 15:11 dogerber

Hi @dogerber

thanks for bringing this to our attention, we'll take a look as soon as we can. After a short discussion about this with the team, it's likely that the example will be re-written to better reflect our new standards with Inkplate examples.

I'll update you here when there's progress.

-Rob

rsoric avatar Nov 09 '23 12:11 rsoric

Hi,

Any progress on this? just tried it with Inkplate2 and it's not starting up

sylwester- avatar Feb 07 '24 14:02 sylwester-

Hi @sylwester- , we unfortunately haven't gotten around to it just yet. Thanks for reminding us, I'll try to squeeze this in our schedule again.

Specifically for Inkplate2, what does the Serial monitor say? Does the device just restart or it can't connect to the internet? There should be some relevant info on the Serial monitor

rsoric avatar Feb 12 '24 14:02 rsoric

For me it was simple WiFi settings.

I wanted to check the code to see how I can display atmospheric data. The whole purpose of my project was to get Netatmo Weather Station data onto the display. In the end I went with a home assistant integration.

Now I have home assistant getting all the required data, and I'm calling a local API to fetch the data and display it on the inkplate2.

This set up has been working very well for three days straight so far.

sylwester- avatar Feb 12 '24 22:02 sylwester-

Closing this as there's no more activity and it seems to work.

rsoric avatar Mar 25 '24 10:03 rsoric