Building public, dynamic webapps using Micropython on the ESP32

Presented at May Contain Hackers (MCH2022), July 22, 2022, 8:40 p.m. (180 minutes).

This workshop will introduce upagekite, an open source micro-framework for building dynamic, public webapps using Micropython on the low-cost ESP32 system-on-a-chip. This session will start with participants plugging the ESP32 (an ESP32-CAM devkit) into their laptops for the first time, and by the end of it they will have a running web server on the public Internet - running in a few hundred KB of RAM on a chip that costs only a few euro. The ESP32 is a low-cost system-on-a-chip with built-in support for bluetooth and WiFi. Although heavily resource constrained, with only a few hundred KB of RAM, it is possible to run Micropython on these devices and expose a live webserver: not just to the local network, but to the public web using open-source Pagekite reverse proxies. Topics covered in the workshop will include: 1. Flashing the latest version of Micropython to the chip 2. Uploading custom Python code 3. Creating a simple, dynamic webapp which interacts with peripherals, such as a camera or GPIO 4. Exposing the webapp to the public web 5. Security concerns and constraints Advanced topics which may be covered, depending on time and interest: * Conserving RAM by "freezing" custom Python code into the Micropython binary * Creating a captive portal for configuring the device on a new network Participants are welcome to bring their own ESP32 chips, but there will also be a few chips handed out as giveaways, on a first-come, first-served basis (max 25). Participants should bring their own laptops, a data-capable micro-USB cable, and be familiar with basic use of git and Python.

Presenters:

  • Bjarni RĂșnar Einarsson
    Bjarni RĂșnar Einarsson is an Icelandic hacker who has been working on software development and systems administration since the mid-90s. He cares deeply about Open Source, digital autonomy and user privacy. Bjarni created and runs PageKite (www.pagekite.net), and was one of the founding members and lead developer of Mailpile (www.mailpile.is). He still works on both projects as much as he can. Bjarni tweets things at https://twitter.com/HerraBRE .

Links:

Similar Presentations: