|
META TOPICPARENT |
name="WebHome" |
Accessing the Python interpreter
MicroPython |
| MicroPython implements the Python 3.4 syntax. It is Open Source and can be downloaded from its github repository. There are versions for different kinds of processors and descriptions on how to build and flash the interpreter. The ESP32 port is based on the ESP-IDF development environment provided by Espressif, the company behind the ESP processors. They also provide the xtensa-esp32-elf-gcc cross compiler and associated libraries. Going into details on how we built the interpreter would go beyond the limits of what this course can teach. Let's suppose that the interpreter in already installed in the ESP32 flash and ready to run.
Details about MicroPython is found in its documentation, which has a chapter dedicated to ESP32 functionality. |
|
> > |
For convenience a MicroPython firmware binary as well as the scripts needed to erase the ESP32 flash and to program it with the firmware are given here:
https://iotworkshop.africa/pub/IoT_Course_English/AccessingThePythonInterpreter/firmware.bin
https://iotworkshop.africa/pub/IoT_Course_English/AccessingThePythonInterpreter/esp32_erase.sh
https://iotworkshop.africa/pub/IoT_Course_English/AccessingThePythonInterpreter/esp32_flash.sh |
| Accessing the interpreter though the serial line
In order to connect to the ESP32 we need a serial terminal emulator like minicom, gtkterm or seyon. Later on we will use thonny as an editor to write our Python scripts and save them on the PC but also to connect to the ESP32 through thonny's command window. |
|
META FILEATTACHMENT |
attachment="minicomHelp.png" attr="" comment="" date="1587839282" name="minicomHelp.png" path="minicomHelp.png" size="59121" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="minicomSave.png" attr="" comment="" date="1587839282" name="minicomSave.png" path="minicomSave.png" size="15423" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="microPythonSession.png" attr="" comment="" date="1587843997" name="microPythonSession.png" path="microPythonSession.png" size="62164" user="UliRaich" version="1" |
|
|
> > |
META FILEATTACHMENT |
attachment="firmware.bin" attr="" comment="" date="1588845528" name="firmware.bin" path="firmware.bin" size="1479504" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="esp32_flash.sh" attr="" comment="" date="1588845528" name="esp32_flash.sh" path="esp32_flash.sh" size="255" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="esp32_erase.sh" attr="" comment="" date="1588845715" name="esp32_erase.sh" path="esp32_erase.sh" size="185" user="UliRaich" version="1" |
|