By Benjamín Arratia


Compatible/tested hardware:

Downloads:

https://github.com/GRCDEV/PyLora_SX127x_extensions(the .mpy version!)

https://github.com/SMARTLAGOON/m3LoRaCTP

Instructions

  1. Download and install the latest firmware for ESP32.

    esptool.py --chip esp32 --port /dev/tty.usbserial-0001 erase_flash
    esptool.py --chip esp32 --port /dev/tty.usbserial-0001 --baud 460800 write_flash -z 0x1000 esp32-20220618-v1.19.1.bin
    

    The specific instructions and firmware are available in the following page:

    MicroPython - Python for microcontrollers

    Use this one for the LILYGO TTGO LORA32:

    MicroPython - Python for microcontrollers

  2. Use ampy to “put” the files into the micropython device . Some are .py files like your main.py and others can be .mpy like PyLora_SX127x_extensions. (How to generate the .mpy files? )

    ampy --port /dev/tty.usbserial-0001 ls #To check the files
    ampy --port /dev/tty.usbserial-0001 put PyLora_SX127x_extensions
    ampy --port /dev/tty.usbserial-0001 put AlLoRa
    ampy --port /dev/tty.usbserial-0001 put main.py #You should always have a main.py...
    

    More info about how ampy works here:

    MicroPython Basics: Load Files & Run Code

  3. In a mac computer you can use:

    screen /dev/tty.usbserial-0001 115200
    

    To evaluate the execution of the code. Start by soft reseting the device with Ctrl + D.


    $$ \text {Benjamín Arratia - 2026} $$


    My work