r/MicroPythonDev • • Apr 21 '25

Where are the board config documents?

2 Upvotes

I want to add micropython support for my new board, but there seems to be no documentation about how to do it. There is only an example boards repo with no explanation, and a dead forum link.


r/MicroPythonDev • • Feb 11 '26

micrOS - Web dashboard and REST API

Post image
2 Upvotes

Hi, micrOS main interface is socket (terminal like experience), it is way more light weight than http, but seeking the best integration I have built a web engine too (can be turned on in micrOS settings)

Even you can create / edit application code (or any text) on the device itself :) very flexible, right? 😊

https://github.com/BxNxM/micrOS


r/MicroPythonDev • • Sep 08 '25

AP shows up even if I set mode to IF_STA on Wemos D1 Mini

2 Upvotes

Why is my code enables an access point? I just want to connect to a Wi-Fi network. It might be the OTA upload method, but I don't remember setting it up. I'm using Thonny. I flashed it with MicroPython v1.26.0 downloded from MicroPython website and following their tutorial. Also, there are no other boards running with MicroPython with WiFi. I'm worried if this consumes more power or processing power.

import network

wlan = network.WLAN(network.WLAN.IF_STA)
wlan.active(1)

if not wlan.isconnected():
    wlan.scan()
    wlan.connect(config.SSID, config.PASSPHRASE)

r/MicroPythonDev • • Sep 24 '26

MicroPython debugging now supports USB, UART, and even tiny MCUs with only 24 KB of RAM

9 Upvotes

Our team at GHI Electronics just released a free (MIT-licensed) MicroPython Debugger for VS Code with real source-level debugging over USB or UART.

Set a breakpoint in your Python source, press F5, and debug the code running on the actual MCU.

You can:

  • Set breakpoints

  • Step Over / Step Into / Step Out

  • Inspect variables

  • Use Watch

  • View the Call Stack

  • Break on exceptions

  • Continue / Pause execution

USB

  • USB debugging on supported MicroPython boards (RP2040, RP2350, Pico, Pico 2, ESP32-S2/S3)

UART

  • Original ESP32 boards (via CP2102/CH340/FTDI bridge)

Tiny MCU

  • STM32C071

To test how small an MCU the debugger could run on, I used a DUELink Holiday Tree with an STM32C071KBU6, which has 24 KB of RAM and 128 KB of Flash, running MicroPython code with SPI and PWM.

The debugger is free to use:

GitHub: ghi-electronics/micropython-vsc-extension

VS Code Marketplace: MicroPython Debugger

Example Holiday Tree project: STM32C071 Christmas Tree example

I'd be interested to hear what hardware you use with MicroPython and what you'd like to see supported.


r/MicroPythonDev • • Feb 10 '26

I built a lightweight web dashboard framework for MicroPython (ESP32 / Pico W)

8 Upvotes

Hey folks 👋

I’m a college student learning embedded systems, and while working on IoT projects I needed a super simple web dashboard for MicroPython boards.

Most tools felt heavy, so I built a tiny one myself:

MicropiDash – a lightweight web dashboard framework for ESP32 & Raspberry Pi Pico W.

Features:

Designed for low-memory MicroPython boards

Simple HTML + MicroPython backend

Easy to extend for IoT dashboards

Beginner-friendly for students & prototypes

GitHub:

https://github.com/kritishmohapatra/micropidash

PyPI:

https://pypi.org/project/micropidash/

If you find it useful, a ⭐ on GitHub would mean a lot (it really helps visibility).

I’ve also added a Buy Me a Coffee link for anyone who wants to support my learning journey ☕

I’d love feedback, feature ideas, or PRs from the community.

What would you like to see next—graphs, WebSocket, MQTT integration?


r/MicroPythonDev • • Dec 12 '25

Touchscreen example code

4 Upvotes

I'm new to micropython; but I have several years of significant Python programming under my belt. I've always focused on back end, and middleware. So I dont do anything with front ends; except for interacting with pre-baked ones.

I have a simple project in mind, and I think micropython is perfect for it. Its simply a timer, and sensor reader, that activates one of a couple of relays. Most important though, I want it to have a touch screen. I picked up a Waveshare 3.5"(f), and a pico 2 w. I was able to get the waveshare demo for pico working; even though they dont give a direct pinout. I had to read the script, and figure out what each one was for. But I did get that working. Screen lights up, and touchpad is reading out correctly.

So the next thing is building a simple touchpad interface. Does anyone have any example code for this? Coincidently the day I got the pico, 1.27.0 was released. So I'm obviously planning to use that version of micropython.

Also, I was able to get it connected to wifi. So I've got hands around the physical hardware, and basic interpreter functionality.


r/MicroPythonDev • • Feb 05 '26

Why does micropython only have time in seconds (time.time()) and nanoseconds (time.time_ns())?

3 Upvotes

r/MicroPythonDev • • Apr 02 '26

micrOS 3.0 - Standalone

3 Upvotes

https://github.com/BxNxM/micrOS/releases/tag/v3.0.0-0

`micrOS` is best described as a MicroPython-based embedded application framework for ESP32-class boards and similar hardware. It is not an RTOS in the Zephyr or QNX sense, and it is not trying to compete with bare-metal ESP-IDF development. Instead, it provides a lightweight runtime layer that turns a microcontroller into a modular, network-accessible device with built-in shell access, web features, scheduling, and loadable application modules.

That makes `micrOS` especially interesting for makers, advanced hobbyists, prototype teams, and smart-device builders who want to move beyond one-off firmware sketches. If you come from Arduino, the main difference is that `micrOS` is not just about flashing a single app. It is about building a reusable device platform where functions can be exposed over the network, modules can be extended over time, and the board behaves more like a tiny embedded service host than a fixed firmware image.

Technically, one of the framework’s strengths is its architecture. It uses a relatively small core, an async task model, configuration-driven startup, and lazy loading for optional subsystems like the web UI and extra modules. On properly dimensioned hardware, with enough memory headroom and well-behaved applications, that design can feel very responsive in practice and surprisingly deterministic from a user perspective. That said, app quality matters a lot here: the responsiveness of the final device depends not just on the framework, but on how carefully the modules, tasks, and memory usage are designed.

This is also where `micrOS` shows maturity. It is not only about runtime features, but about the surrounding workflow as well. Deployment support, board images, module tooling, GUI utilities, and client-facing control options make it feel more like a usable embedded platform than a loose collection of scripts.

`micrOS` is a strong fit for Wi-Fi-connected controllers, sensor nodes, lighting systems, robotics demos, home automation devices, and modular IoT prototypes. It is less suitable for systems that need strict hard real-time guarantees, certification-oriented architecture, or extremely tight low-level optimization. In other words, it works best where flexibility, development speed, and networked usability matter more than RTOS-class determinism.

The bottom line is simple: `micrOS` is for developers who want to build connected embedded devices quickly and treat those devices more like manageable application platforms than traditional monolithic firmware. And when the hardware is sized correctly and the apps are written with discipline, it can deliver a user experience that feels fast, stable, and impressively polished for this class of system.

https://github.com/BxNxM/micrOS


r/MicroPythonDev • • Apr 13 '26

I built a $10 Wi-Fi USB Keylogger & DuckyScript Injector using an ESP32-S3

11 Upvotes

Hey everyone,

I wanted to share a hardware project I’ve been working on lately. It’s called DuckLogger—a DIY, ESP32-S3 based USB Keylogger and BadUSB. The best part is that you don't need any custom PCBs to build it, and the off-the-shelf parts cost less than $10 total on AliExpress.

The Hardware: All you need is an ESP32-S3 SuperMini and a CH9350 HID Module wired together with a few jumpers. The CH9350 acts as a USB host, taking the physical keyboard input and passing it via UART to the ESP32. The ESP32 logs the keystrokes to its internal flash and simultaneously acts as a USB HID device to the target PC.

Features I built in:

Hardware Keylogging: Silently records all keystrokes to a text file on the ESP32's flash storage.

Built-in Command & Control (Web UI): It hosts its own Wi-Fi Access Point (or connects to an existing network). You can connect to it and open the C2 dashboard in your browser.

Over-the-Air Log Extraction: Download the keystroke logs directly from the Web UI.

Live Remote Keyboard: You can pull up a virtual keyboard in the web interface and send keystrokes to the target PC in real-time over WebSockets (almost zero latency).

DuckyScript Injection: You can remotely execute DuckyScript payloads through the web UI to run automated keystroke attacks.

The firmware is written entirely in MicroPython. I also wrote a flasher script that handles the installation, packaging, and setup automatically.

I've open-sourced the whole thing. If you want to build one yourself, check out the wiring schematics and code on GitHub: https://github.com/Itsmmdoha/duckLogger


r/MicroPythonDev • • Nov 03 '24

Build a talking thermometer with just a few components

Post image
11 Upvotes

r/MicroPythonDev • • Jan 29 '26

Wifi Access Point Code error

2 Upvotes

I'm getting a weird error trying to create an access point. My environemnt is Windows 10, Thonny, Arduino RP2040 Connect, Micropython version 1.27.

myssid = "Pico2W"
mypassword = "12345"

ap = network.WLAN(network.AP_IF)
ap.config(ssid=myssid, password=mypassword)
ap.active(True)

On the ap.config.. line it gives this error:

TypeError: extra keyword arguments given

This code is pretty standard and has worked before but I can't find anything on the web about why its throwing this error.


r/MicroPythonDev • • Jan 16 '26

How is my CalSci?

5 Upvotes

r/MicroPythonDev • • May 20 '26

Pyrite's a cool little Project that helps with Task scheduling

4 Upvotes

'm pretty sure that I'm not the first and only person to stumble into a problem where I wanna handle several Tasks at seperate intervals, and eventually I found myself clogging up while Loops and everything just became a huge stupid disaster, so I built Pyrite, which - at least to me - seems like a pretty good solution for a problem that me and probably some other people have. And yes, Asyncio exists and is better maintained but if you really like Asyncio, you're either lying or a masochist, especially for small projects. Now Pyrite is - in my opinion - very approachable, as you can see in the Code Samples there or in this sample here:

from pyrite import *
from machine import Pin

led = Pin("LED", Pin.OUT)
def led_task():
   led.toggle()
def simple_task():
  print("Hello world")

tasks = [Task(led_task, 500), Task(simple_task, 1000)]
sched = Scheduler(SimpleScheduling) # We don't need the Overhead from PunitiveScheduling here as none of our Tasks has the option of stalling anywhere.
# If you were using a lot of Sensors, conisder replacing SimpleScheduling with PunitiveScheduling
sched.add_tasks(tasks)
sched.run_forever()

Anyways yeah I guess I'm just asking for feedback, so https://github.com/ten-faced-carrot/pyrite everyone.

(Please don't be mean)


r/MicroPythonDev • • 7d ago

ICYMI - The Python on Microcontrollers Newsletter: 600 CircuitPython Libraries, Upcoming Features and Much More!

Post image
9 Upvotes

If you missed this week’s Python on Microcontrollers Newsletter, here is the ICYMI (in case you missed it) version.

To never miss another issue, subscribe now! – You’ll get a terrific newsletter each Monday (which is out before this post). 12,312 subscribers worldwide!

The next newsletter goes out Monday morning and subscribing is the best way to keep up with all things Python for hardware. No ads or spam, no selling lists, leave any time.

Read this week's issue at https://blog.adafruit.com/2026/11/10/icymi-the-python-on-microcontrollers-newsletter-600-circuitpython-libraries-upcoming-features-and-much-more/


r/MicroPythonDev • • Jan 23 '26

Storing functions in my CalSci. Tell me what else you need.

7 Upvotes

r/MicroPythonDev • • Oct 18 '25

ESP32 Wroom SPI

Thumbnail
gallery
3 Upvotes

So I have this ESP32 (photo 1). I installed Micropython with Thonny. When checking SPI(1) in the REPL (photo 3), it gives me sck=14, mosi=13 and miso=12. On the controller there is none of these pins available. Also photo 2 shows SPI(0) is available on pins GPIO 5, 18. 19, 23. In REPL SPI(0) “does not exist”. Firmware is the Generic for ESP32. Should Thonny show the available SPI pins? What am I missing? Thanks for your help.


r/MicroPythonDev • • Jan 26 '26

PYB v1.1 SD card no read

3 Upvotes

I am a newbie just trying to get started. My pyboard has PYBFLASH(D) where main.py is located and will execute various blink LED programs so I know the board is OK. I plugged in a micro SD card on which I copied a new main.py from my host laptop but the pyboard won't boot up from the SD card. The file manager on my laptop (WIN 11) sees the PYFLASHH(D) on the pyboard but not the SD card. The main.py was generated on Notebook and saved on the SD card. Does the SD card have to be initialized in some way? If so, how to do that on my laptop?


r/MicroPythonDev • • Apr 09 '26

Day 76/100

3 Upvotes

Day 76 of my #100DaysOfIoT challenge — built a bidirectional ESP-NOW system on two ESP8266 nodes.

Each node reads DHT11 temperature & humidity, sends it to the peer, and receives + displays the remote node's data — all peer-to-peer, no router needed.

Interesting part: one node uses SSD1306 (0.96") and the other uses SH1106 (1.3") — different display controllers but same logic.

Code + README on GitHub 👇

https://github.com/kritishmohapatra/100_Days_100_IoT_Projects

Day 76/100 ✅


r/MicroPythonDev • • Jan 17 '26

Assigning variable=const(1024) in method causes issue within class' other method(s).

3 Upvotes

Greetings, I cannot really post this in 'learn python' because TMK CPython does not use const().

My question is why assigning const(1024) to variable 'maxsize_string' in method_one() allows that variable to be seen in method_two(). FYI, when I just assign maxsize_string=1024 without const() it works fine and stays local. Why does it not stay 'local' to method_one() and/or assessed as a variable assigned a constant?

from micropython import const

class TestVariableScope:
    def __init__(self, v_url):
        self.version_url = v_url
        print(f"@ __init__(): url is {self.version_url}\n")

    def method_one(self):
        try:
            #maxsize_string = const(1024)  # This will cause error; somehow this variable gets seen in method_two().
            maxsize_string = 1024  # Adjust as needed
            print(f"@ method_one(): maxsize_string={maxsize_string}\n")
        except Exception as e:
            print(f"@ method_one(): An error occurred: {e}")
        finally:
            pass

    def method_two(self):
        try:
            print(f"@ method_two(): maxsize_string in method_one() is {maxsize_string}")
        except NameError:
            print("@ method_two(): Variable 'maxsize_string' is not creeping from method_one().")
            maxsize_string = 128 # SyntaxError: can't assign to expression because const(1024) used in method_one()
            print(f"@ method_two(): maxsize_string={maxsize_string}\n")

    def eval_methods_for_scopecreep(self):
        self.method_one()
        self.method_two()

v_url = "https://text.npr.org/"
testme = TestVariableScope(v_url)  # Create instance/class object
testme.eval_methods_for_scopecreep()

r/MicroPythonDev • • Feb 21 '26

Day 57/100 – ESP-NOW Smart Relay & Sensor System (MicroPython) 🚀

2 Upvotes

Hey everyone,
I’m doing a 100 Days, 100 IoT Projects challenge, and today I built a bidirectional ESP-NOW smart relay and sensor system using MicroPython.

What it does

  • Sender ESP8266/ESP32 with buttons + OLED acts as a control panel

  • Receiver ESP controls a 4-channel relay module

  • DHT11/DHT22 sensor data is sent back in real-time

  • OLED displays temperature and humidity

  • Uses ESP-NOW (no WiFi, no router, ultra-low latency)

Tech Stack

  • ESP8266 / ESP32

  • MicroPython

  • ESP-NOW protocol

  • SSD1306 OLED

  • DHT11/DHT22 sensor

GitHub repo:
👉 https://github.com/kritishmohapatra/100_Days_100_IoT_Projects

I’d love feedback, stars, or collaboration ideas.
Goal: Build open-source IoT learning resources for students.


r/MicroPythonDev • • Mar 20 '26

micropidash v2.0.0 — Real-time sensor graphs for ESP32 & Pico 2W

4 Upvotes

Just released v2.0.0 of micropidash — a lightweight async web dashboard library for MicroPython.

What's new:

- add_graph() — real-time line graph with rolling data buffer

- Canvas-based rendering, no external libraries needed

- Y-axis labels, grid lines, fill area, latest value dot

- Separate /graph-data endpoint for efficient polling

- Bug fixes: CSS grid layout, drain() flush, onload update

Tested on Pico 2W with DHT11 — temp + humidity graphs live in browser over WiFi.

GitHub: github.com/kritishmohapatra/micropidash

PyPI: pip install micropidash

Feedback welcome!


r/MicroPythonDev • • 20d ago

We implemented SRP-based acoustic imaging for gas-leak localization

2 Upvotes

r/MicroPythonDev • • Mar 02 '25

How i start with micropython

3 Upvotes

Im new at programming, i barely know anything about it, but i really wanna make some stuff with ESP32 and micropython seems pretty fun, any tip is welcome


r/MicroPythonDev • • Jan 21 '26

A BMI160 MicroPython driver that actually handles interrupts and calibration correctly

4 Upvotes

Hi everyone! I was working on a project using the BMI160 IMU and I realized that most MicroPython drivers out there are either broken or incomplete (especially when dealing with interrupts and sensor calibration).

I decided to write my own lightweight driver focusing on:

  1. Full calibration support (100% accuracy on offsets).

  2. Functional interrupts (No more missed triggers).

If you've been frustrated with this sensor before, check it out! Feedback and stars are welcome. https://github.com/DanielBustillos/bmi160-micropython-driver