preloader

Getting started with Pozetron on the ESP32

The ESP32 is currently one of the easiest platforms to get started with using the Pozetron cloud.

We provide pre-built binary firmwares for popular devices such as the Adafruit Feather HUZZAH32.

Get the firmware

$ poze.py device firmware esp32 -d DEVICE_ID
DEVICE_ID-esp32-stable.bin

Note: If you do not already have a DEVICE_ID head over to Getting Started to provision your first device.

Congratulations! You are now the proud owner of a complete working MicroPython firmware you can flash onto your ESP32 module.

Flash the firmware to your module

Assuming that your ESP32 module is accessible at /dev/ttyUSB0 you can use the following commands to erase the flash, flash the firmware to the device and connect to the device over serial.

# erase module's flash to avoid issues
$ esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 erase_flash
# deploy the firmware
$ esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z --flash_mode dio --flash_freq 40m 0x1000 DEVICE_ID-esp32-stable.bin
# Once this process finishes unplug the module from the serial connection and power
# before plugging it back in and running the next command which will allow you to
# connect to the device via serial
$ picocom -b 115200 /dev/ttyUSB0

If you don't have esptool installed you can get it with:

$ pip install esptool

If you don't have picocom installed on Ubuntu/Debian you can install it with:

$ sudo apt install picocom

This can all be shortened into one line:

$ esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 erase_flash && esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z --flash_mode dio --flash_freq 40m 0x1000 $(poze.py device firmware esp32 -d DEVICE_ID)

Wireless Setup

Now that your device has a custom firmware built, you can connect it to your network by first connecting to the WiFI network being broadcast by the module.

This will look like: DIRACK-ACDE34 and the password is pozetron.

Once on the network open up a Firefox Mobile or Desktop browser (other browsers such as Chrome will not currently work) and navigate to http://192.168.4.1/.

You will be prompted for the name of your wireless network along with the password aka the WPA2 pre-shared key. After entering both of these values and pressing ‘Submit’ your ESP32 will reset itself, connect to your WiFi network and then register itself with the Pozetron cloud.

Head back on over to the Getting Started guide to continue your journey and upload your first Python code to be deployed to your newly minted device.

Free Registration

No credit card required. Limited time only.

Register Free