You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I decided to modify MicroPython for the ESP32 by adding a screen and buttons. To achieve this, I created a graphical interface with an explorer, from which I hope you can launch files. mp_task in main.c in the MicroPython repository
if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL && ret != 0) {
int ret = pyexec_file_if_exists("main.py");
if (ret & PYEXEC_FORCED_EXIT) {
goto soft_reset_exit;
}
}
for (;;) {
if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) {
vprintf_like_t vprintf_log = esp_log_set_vprintf(vprintf_null);
if (pyexec_raw_repl() != 0) {
break;
}
esp_log_set_vprintf(vprintf_log);
} else {
if (pyexec_friendly_repl() != 0) {
break;
}
}
}
The code runs at this location, but it always executes the same file. I've tried passing the file path to pyexec_file_if_exists and trying to run the Python file import main in repl, but when I run it this way, my GUI freezes and the file doesn't execute. I suspect repl is to blame. Has anyone done something similar? What should I look for?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I decided to modify MicroPython for the ESP32 by adding a screen and buttons. To achieve this, I created a graphical interface with an explorer, from which I hope you can launch files.
mp_task in main.cin the MicroPython repositoryThe code runs at this location, but it always executes the same file. I've tried passing the file path to
pyexec_file_if_existsand trying to run the Python fileimport mainin repl, but when I run it this way, my GUI freezes and the file doesn't execute. I suspect repl is to blame. Has anyone done something similar? What should I look for?Beta Was this translation helpful? Give feedback.
All reactions