ESP32 Micro Python

Notes created from the rototron website, thnx for the explanation

Installing Micro Python using a raspberry pi

  • First update a fresh installation
    • sudo apt-get update -y && sudo apt-get upgrade -y
  • Install the esptool
    • sudo pip3 install esptool
  • Check the connected USB port
    • dmesg | grep ttyUSB
      • [ 177.899053] usb 1-1.3: cp210x converter now attached to ttyUSB0
  • Check functionality
    • esptool.py –port /dev/ttyUSB0 flash_id
  • Erase the flash memory
    • esptool.py –port /dev/ttyUSB0 erase_flash
  • Flash Memory with MicroPython
    • esptool.py –chip esp32 –port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20180511-v1.9.4.bin

Communincating with Micro Python

  • Install rshell (remote shell)
    • sudo pip3 install rshell
  • Start remote shell
    • rshell –buffer-size=30 -p /dev/ttyUSB0
  • List connected boards
    • home/pi>boards
  • Start repl (MicroPython programing environment)
    • repl
  • Testing functionality
    • print(‘Hello World’)

Writing programs