Including rpcWiFi in sketch causes seeed_line_chart to fail on Wio Terminal

Hi all

I have been using Wio terminal to read data from I2C sensors for a couple of weeks (works great), and using seeed_line_chart to display sensor data (looks really nice!).
I now need to send data over wifi, so yesterday I followed instructions on https://wiki.seeedstudio.com/Wio-Terminal-Network-Overview to flash the latest firmware to RTL8720.
Wifi connection works fine, and collecting data from the sensors still works nicely, but now, when I try to draw line charts, nothing happens. Other operations with the LCD succeed (drawing lines, shapes, fonts…), but when I try the basic line chart example provided in https://wiki.seeedstudio.com/Wio-Terminal-LCD-Linecharts, it fails as soon as I add #include “rpcWifi.h” in the sketch, and works again when I remove the line.

I tried removing the libraries in my sketch folder and downloading them again to remove potential conflicts, but it does not change anything. rpcWifi and seeed_line_chart don’t seem to get along very well. Could anybody help me with this?

Best,
Olivier

Hi @OlivierB,

It is not very efficient to use Wi-Fi and LCD at the same time because of the limited RAM on the Wio Terminal.

Wi-Fi itself runs FreeRTOS underneath and it takes about 75kb of RAM at least. If creating a sprite with 320x240 (like in the line chart example) that would be another 76kb. The remaining RAM will be used for other functions. Wio Terminal only has 192kb of RAM and it is not enough to achieve this.

So the only way to use Wi-Fi and LCD at the same time is to use small sprites. You may do spr.deleteSprite() right after your pushSprite to save some space too.

Check this example for reference:

Unfortunately, line charts cannot be used along with Wi-Fi because of this issue.

Best Regards,
Lakshantha

Hi @lakshan

Thank you very much. This helps a lot!

Best,
Olivier

ps: Possibly there could be a footnote about this in the line chart library documentation?

1 Like