Skip to content

Non‐browser based setup

Cort edited this page Sep 8, 2023 · 1 revision

The recommended way to setup a new ESP32 is to use the page here: https://quirkycort.github.io/IoTy-Flash/public/index.html

...but if you prefer not to use the above page, you can follow these instructions.

1) Install MicroPython

Follow the instructions here : https://docs.micropython.org/en/latest/esp32/tutorial/intro.html, but use the firmware from https://github.com/glenn20/micropython-espnow-images/tree/main/20220709_espnow-g20-v1.19.1-espnow-6-g44f65965b instead.

Note

  • If you use the default micropython firmware, you will not be able to use ESP-NOW.
  • Version 1.20 hasn't been tested with IoTy and is currently not recommended for use.

2) Select a name

Edit the file "_ioty_name" in the "public/firmware" folder to set the name for your device. Keep within 8 characters.

3) Install pyboard

Download the pyboard.py command line utility by following the instructions here https://docs.micropython.org/en/latest/reference/pyboard.py.html

This is needed to transfer the IoTy firmware to the ESP32.

4) Reformat Filesystem (Optional)

It is recommended to reformat the device filesystem to Littlefs. Littlefs is a filesystem designed for flash-based devices, and is much more resistant to filesystem corruption.

Follow the instructions here https://docs.micropython.org/en/latest/reference/filesystem.html#littlefs

5) Make directories

Create the necessary directories on the ESP32 using the following command...

pyboard.py --device /dev/ttyUSB0 -f mkdir ioty
pyboard.py --device /dev/ttyUSB0 -f mkdir ioty/html
pyboard.py --device /dev/ttyUSB0 -f mkdir umqtt

The "/dev/ttyUSB0" will need to be changed to whatever makes sense for your computer.

6) Transfer IoTy files

Transfer the IoTy files to the ESP32 using the following command. Make sure you are in the "public/firmware" directory first.

pyboard.py --device /dev/ttyUSB0 -f cp ioty/* :ioty/
pyboard.py --device /dev/ttyUSB0 -f cp ioty/html/* :ioty/html/
pyboard.py --device /dev/ttyUSB0 -f cp umqtt/* :umqtt/
pyboard.py --device /dev/ttyUSB0 -f cp boot.py _ioty_name :

7) Restart the device

Restart your ESP32 (...press the reset button or power-cycle it).

There are 3 different ways to put your device into program mode and connect to it. See the next section for details.

Clone this wiki locally