Giga/LVGL/IOT variable management - Framework Code?

Hi All,

Could we build a framework of code for using the Giga Display with the Giga R1 (and memory storage) and LVGL and the Arduino IOT Cloud?
We could start off with something simple and gradually extend it. I think this will be very helpful for people getting started with the Giga R1 and Giga Display who also want to get the benefit of both Arduino Cloud and SquareLine Studio for a nice looking UI.

Per @ptillisch has provided some great starting instructions for getting an initial sketch up and running and linking SquareLine.

The Giga R1 and Giga Display is a superb combination. Once you've got LVGL working it's utterly brilliant, however, you quickly end up in a place where you want to have it working smoothly with the Arduino Cloud variables as well as storage on the memory of the R1. This is where it all gets a bit complicated.

You start with an IOT Cloud variable in your sketch and you want to connect this with a widget on your UI so that the variable can be adjusted both on the IOT Dashboard and on the Giga Display UI (lvgl) and the two things stay in sync, so if you change the value on the Cloud the Giga Display updates and vice-versa. At the moment I am using a synchronisation script that catches a value change on the UI or Cloud and pushes that change to the other one. I turned this into a function that can be called, as I've got a lot of cloud variables, but it's still a bit clunky. Ideally you would embed the iot variable into the lvgl code but that value is in a type-def struct, so that makes it a bit difficult to directly access.

Next you're likely to want to go is to store your variables in the memory of the Giga R1. So then you're into working out how to do that and which one of your storage locations takes precedence - the IOT cloud or the memory of the R1. The memory of the R1 is your likely candidate as you can't always rely on the cloud being available (wifi outage etc), so now you need your sketch to be able to run without the cloud working...

Thoughts?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.