preloader

Getting started with Pozetron on the ESP8266

The ESP8266 is currently the easiest platform to get started with using the Pozetron cloud.

We provide pre-built binary firmwares for popular devices such as the Adafruit Feather HUZZAH and SparkFun ESP8266 Thing.

Get the firmware

$ poze.py device firmware esp8266 -d DEVICE_ID
DEVICE_ID-esp8266-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 ESP8266 module.

Flash the firmware to your module

Assuming that your ESP8266 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 --port /dev/ttyUSB0 erase_flash
# deploy the firmware
$ esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect --flash_mode=qio 0 DEVICE_ID-esp8266-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 --port /dev/ttyUSB0 erase_flash && esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect --flash_mode=qio 0 $(poze.py device firmware esp8266 -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 ESP8266 will reset itself, connect to your WiFi network and then register itself with the Pozetron cloud.

Head back on over to the Quickstart 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