The ftDuino32 is meant to be an addon to the ftDuino controller (http://ftduino.de). which basically is a Arduino Leonardo prepared to interface with the fischertechnik construction toy.
The ftDuino32 is meant to give this (Micro-)Python, a nice touch screen interface and online/web based graphical programming using Blockly. In the end the users should be able to write and run simple (Python) programs to control their fischertechnik robots using nothing but the ftDuino32 and a browser.
The ftDuino32 currently features:
Micropython
LVGL based touch GUI to e.g. setup the network/wifi and to run local user programs
Currently I am adding some first LVGL related blocks and some simple “click this button to increase that counter” already works. I’ll make a video once this allows for a nice demo.
Some days of real life usage with this showed that I need an even simpler wrapper around LVGL, The kids e,g, expect to just “set a button” color and doing so they expect that various shades of that single color are automatically applied to the object and they don’t expect to have to care for different states. Another example is the alignment. If they center a label they expect it to stay centered even if they change the labels text.
So what I am doing now is to implement a l²vgl (lite little …) python module that does abstractions like this and provides an extremely simplified API based on such expectations.
And finally blockly is totally not aware of OO principles. So I can make this lite API non-OO to make the blockly generated code more readable.
In v8 both are solved lv_obj_align() realign the object is its size changes and there are lv_color_palettes to select a base color. See the widgets demo: https://lvgl.github.io/lv_sim_emscripten/
In the meantime I’ve updated the simplified wrapper a little bit:
This results in much shorter and easier to understand Blockly generated code. Beforehand Blockly had to generate all kinds of wrappers and helper functions which would not allow a basic user to understand any of the generated Python code. A simple Blockly generated program now looks like below.
This still isn’t perfect and all this global variables handling Blockly introduces looks ugly. But at least the code is somewhat understandable.