Getting Started - wolfen351/public-micropython-iot-platform GitHub Wiki

This page will help you to get started with the public-micropython-iot-platform. It provides information about the supported hardware and modules, and guides you through the installation process. This includes installing Micropython, selecting or creating a profile, and sending all the required micropython files to the board.

Requirements

You will need a compatible board. Pretty much any ESP32 or ESP8266 will work, provided it has at least 100kb of RAM.

You will also need a computer to flash the board and to send the files to the board. You will also need a USB cable to connect the board to the computer.

You will need eiher a board that has a usb port or a usb to serial adapter to flash the board. Make sure the drivers for the usb to serial are installed.

You will also need powershell to run the sync.ps1 script to send the files to the board. (Contributions for linux support are welcome!)

TLDR:

  • ESP32 or ESP8266 board
  • Computer
  • USB Cable
  • Powershell (for flashing and sending files to the board)

Tested and Supported Hardware

Many other boards will probably work too!

Preparing the board

You need to have a micropython environment on the boad to use. If you already have this, you can skip this section.

Install Micropython

To install this on your microcontroller, first flash micropython on it. You need at least version 1.22. You can find firmware and flashing instructions here: https://micropython.org/download/esp32/

I've written some powershell scripts to make the flashing process easier for each of the supported boards. Please see hardware/firmware folder for the scripts.

Installing the program on the board

Finally, we get to the fun part. You can load the files on the board and start your IOT journey! :)

Select / Create a Profile

The program is designed to be modular, and to support many different boards. As such, the program is configured using profiles.

You can select a ready made profile, or create a new one for your board. The profile selects which modules to install and run (like gps, or touchscreen etc). IT contains any additional configuration (like which pin the wires will be soldered to) that cannot be changed at runtime.

The profiles are stored in /profiles

If you can't find the profile you need simply create a new one for your board. You can do this by copying any of the json files to a new file called -.json. Then edit the file to match your board.

Send all the required micropython files to the board

You can use the sync.ps1 script to send all the required files to the board. You will need to pass the profile name as a parameter.

sync.ps1 s2mini-dht22

Monitoring the Board Via Serial

Once the sync process is complete, it will automatically switch to serial monitor mode, and you will be able to see the output from the board.

If for some reason, you want to see the serial log without flashing the board, you can use this command:

Install-Module serial-toys.psm1
Show-SerialLog
⚠️ **GitHub.com Fallback** ⚠️