Page 1 of 1

MicroPython or LUA running in paralel with C?

Posted: Fri Jun 19, 2020 5:26 pm
by gunar.kroeger
Hi all,

We have a large project already running with esp-idf sdk.
Now we have the need to add user scripts to our project that would run some simple float calculations and logics every 100ms.
This script will reside in the sd card and pull variables and push some variables back to the c program, which will then log these variables in another file.
I played with designing my own script interpreter, but having something more robust and easier to use would be better.

I see that there are a lot of people who use NodeMCU (LUA) and microPython. But they are always simply using a stock firmware for the interpreter and just writing scripts, and no C.
What we need is something that would run the calculations quickly without interfering with the rest of the project (Wifi, CAN, logging, Bluetooth, etc).
Has anyone done a project similar with what we want? Any recommendations?

Thanks

Re: MicroPython or LUA running in paralel with C?

Posted: Sat Jun 20, 2020 6:21 am
by jeeves
Both lua and micropython are very big, for something like you describe I would use a smaller language like TCL or AWK. I have embedded Jim TCL before, and google shows a few embeddable AWK libraries, but can't say how they would work on the ESP.