SolderedElectronics / Inkplate-Arduino-library

Inkplate family Arduino library. The easiest way to add e-paper to your project.
https://inkplate.readthedocs.io/en/latest/arduino.html
GNU Lesser General Public License v3.0
250 stars 78 forks source link

display.drawImage() messes up memory in OpenWeather_Station example #226

Closed dogerber closed 8 months ago

dogerber commented 1 year ago

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.

rsoric commented 1 year ago

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

sylwester- commented 9 months ago

Hi,

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

rsoric commented 9 months ago

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

sylwester- commented 9 months ago

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.

rsoric commented 8 months ago

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