You’re welcome. One recommendation I would make for someone moving from Python to embedded C++ is to think of your code as a process and not a script. Scripting encourages things like delays and linearly dependent paths, whereas a process needs to maximize value out of system resources (like time & memory) and needs to be able to self-manage. You can then think of your smaller system components (functions, classes, blocks of code) kind of like sub-processes. Think, “what are the conditions where this needs to be running?” and “what is the priority of doing this relative to other things?”.
Think of it like asynchronous code where somethings are linearly processed but other things require checking in to see if the result is available or if a state has changed outside of your control. Doing these things will help you properly modularize your code and reduce unnecessary dependancies.
Using classes and functions to formalize interfaces where information and other dependencies are shared is a great way to keep things organized. Be careful with global variables and where you use them. Debugging complex interdependent embedded code is a PITA, so breaking things down into units and also running the units in independent ways whenever possible will save you a lot of headache.
Welcome to C++!