Go Without Wires: TinyGo on ESP32

Lobsters Hottest Events

Summary

Ron Evans (deadprogram) introduced TinyGo, a Go compiler for embedded devices, and its progress on the ESP32 family in his talk, and showcased TinyFlight, the first drone flight controller written entirely in TinyGo.

<p>[edited to call out the connection to TinyFlight first thing, since the YouTube title doesn't call it out]</p> <p>I originally tried to submit the URL for the Github project, <a href="https://github.com/hybridgroup/tinyflight" rel="ugc">https://github.com/hybridgroup/tinyflight</a>, but was thwarted by submission system.</p> <p>I wanted to draw attention to the project because it is very <em>nicely documented</em>, full of clear (to me, an intermediate gopher) examples of TinyGo code to interact with devices, handle multicore concurrency on an MCU, and build a testable design for a microcontroller application. Started off with <a href="https://github.com/hybridgroup/tinyflight/blob/main/docs/architecture.md" rel="ugc">the architecture doc</a> and have been reading and playing happy. I really appreciate the documentation effort.</p> <p>Do folks have other small-enough-to-swallow-but-big-enough-to-be-real projects that helped them move up the learning ladder?</p> <p>(It's also a cool project in its own right, my Stampfly is in the mail)</p> <p><a href="https://lobste.rs/s/qrhnbc/go_without_wires_tinygo_on_esp32">Comments</a></p>
Original Article
View Cached Full Text

Cached at: 11/24/26, 06:05 PM

**TL;DR:** Ron Evans (deadprogram) introduces TinyGo — a Go compiler for small devices — and TinyFlight, the first drone flight controller written entirely in TinyGo. # Go Without Wires: TinyGo on ESP32 ## Speaker and Background The speaker is Ron Evans, known online by the handle **deadprogram**. He is a hired technical expert at **Hybrid Group**, a boutique consultancy whose business is "developing software that makes your hardware work." One of the projects their team has been involved in is TinyGo — a Go compiler for small devices. TinyGo is built on LLVM. The speaker noted that this is the same underlying technology as Omar's talk on Rust and Johannes's talk on Swift — both languages are also LLVM-based, which gives them similar capabilities in terms of type-safe programming. ## TinyGo Today The speaker shared some GitHub stats from the time: - Nearly **18,000** stars - **1,000+** forks - **250+** contributors - Support for over **150** different hardware development boards and processors — ESP32 among them, of course **On ESP32 support**, the speaker said this really had been the breakthrough year for TinyGo and ESP32: the ESP32-C3, S3, ESP32 Classic (which many people still have plenty of lying around), and the most recent addition, the ESP32-C6. Other developments: - In early summer, the French magazine *Programming* put **three** different articles about TinyGo on its cover - Shortly after that, **Seeed Studio** announced the first TinyGo starter kit based on the **XIAO ESP32-C3** ## The First Piece of Code: Blinky "The Hello World of everything is, of course, a blinking LED." The code structure looks roughly like this: - `package main`: similar to Python and other languages, `package` is the primary unit of organization in code - Imports two packages: - **`machine`**: a special package in TinyGo — the hardware abstraction layer - **`time`**: one of the standard library packages built into Go itself - Inside the `main` function: 1. Declare `machine.LED` 2. Configure it as an output pin 3. Enter a `for` loop — in Go there's only one way to write a loop, and that's `for`; here the `for` loops forever, with no iteration limit 4. Set the LED to low (off), wait 1 second 5. Turn it on, wait 1 second 6. Repeat The speaker specifically noted that the `machine` package as a hardware abstraction layer strongly evokes **MicroPython** — TinyGo has been deeply influenced by it in terms of ease of use and the convenience of creating all kinds of embedded applications. ## ESP32 Ecosystem Tools ### TinyGo Playground TinyGo can compile to **WebAssembly**. The speaker pointed out: if you're using Go in WebAssembly, you're very likely already using TinyGo — not "Big Go." You can write code and try it in the browser at **play.tinygo.org**. ### ESP Flasher If you've heard of **esptool**, ESP Flasher is TinyGo's equivalent: - Written entirely in pure Go, no C required - Can be used as a **command-line tool** (no more Python needed) or as a **package** - Can be embedded into your other Go programs - TinyGo integrates it directly, so you can flash ESP code without needing to download or install any additional tools ### ESP Radio Inspired by the fine traditions of the embedded Rust community, TinyGo runs the radio code's **binary blob directly on bare metal**. The speaker emphasized: **TinyGo runs on bare metal only — no operating system, no RTOS.** The team believes the Go runtime may be the only RTOS you'll ever need — "that's a whole talk in itself." ### El Nano Network Stack A pure Go network stack created by TinyGo team member and the speaker's close collaborator **Patricia Wellington**. It is used in other embedded Go projects such as **TamaGo**, **HPE**, and many more. ### Bluetooth Package The Bluetooth package in TinyGo works on ESP32 as well as on operating systems like Linux, Windows, and macOS — it's a **unified API for Bluetooth access across all devices**, embedded included. ## TinyFlight: A Complete TinyGo Drone Flight Controller The day before, the speaker had presented **Tiny Flight** (project: github.com/hybridgroup/tinyflight) at the **Go Lab** conference in Bologna — **the first complete drone flight controller written in TinyGo**. It runs directly on the drone itself — not just a ground control station, but the full drone. On display was footage of it flying in the speaker's studio (a small office). He had originally planned to fly one live but was told that probably wasn't a good idea. ### How to Test the Drone "Tie it to a test bench with fishing line so it doesn't fly off on its own." ### Protocol and Hardware Compatibility Tiny Flight uses the **ESP-NOW** protocol and is **100% protocol compatible** with the Atom joystick from **M5Stack**. This means you can use Tiny Flight as a drop-in replacement for the firmware on an **M5 Stamp Fly**, with everything else working without any modifications. (The speaker's own Stampfly is also on its way in the mail.) ### Flight Modes - Acro mode - Stabilize mode - Altitude hold - **Position hold** — a feature not found in the official firmware, "because sometimes it's just better to stay in one place" ### Unit Tests and Continuous Integration "If you write Go code, you should write unit tests." The project has a full suite of unit tests using a simulator. The simulator is a **physics simulator**: you compile the TinyGo code to WebAssembly — the exact same code that runs on the **ESP32-S3** processor, just targeting WebAssembly instead — and then run it in the browser. The speaker mentioned that he was debugging drone code in the simulator on the train to the conference, working through some issues found the night before. ### Multi-Core Concurrency TinyGo now supports multiple cores, and the **ESP32-S3 is a dual-core processor**: - **Core 0**: radio communication, sensor communication — everything that is inherently potentially unreliable - **Core 1**: runs the flight controller, which needs to run at **400 Hz** (400 times per second) to keep the drone stable and level, "so it doesn't fly into you" "Of course it's scalable, just like everything written in Go. We want video, because a drone without video isn't as cool." ### Video Transmission Architecture 1. The joystick sends commands via **ESP-NOW** to the **StampFly** 2. The StampFly communicates with a **thermal imaging camera** through a small sidecar via the **Grove I2C** interface 3. The camera captures images and transmits them to a separate **ESP32-C3** 4. That ESP32-C3 connects over **USB** 5. You can then actually see the images in a browser The camera is an **AMG 8833 thermal imaging camera** — "it costs more than the drone itself, of course." ## About This Video The content's publisher also specifically noted that he originally wanted to submit the TinyFlight GitHub project link, but it was blocked by the submission system, so he submitted the video instead. He particularly emphasized that the project has **excellent documentation**, full of clear TinyGo code examples for intermediate-level gophers like himself, covering: - TinyGo code for interacting with devices - Handling multi-core concurrency on MCUs - Building testable designs for microcontroller applications He suggested starting with the **architecture.md** architecture document. He also posed a question to the community: are there other projects that are "small enough to swallow in one bite, but big enough to be real," that can help people move further up the learning curve? ## Closing "Try TinyGo. It's ready for you. It runs really well, and it has a great community. We invite you to give it a try." - Website: tinygo.org - Project: github.com/hybridgroup/tinyflight Source: Go Without Wires: TinyGo on ESP32 (https://www.youtube.com/watch?v=Vi5M-uD2x_U)

Similar Articles

@alin_zone: https://x.com/alin_zone/status/2112143993941442843

X AI KOLs Timeline

A beginner-friendly, step-by-step Chinese tutorial showing readers how to use Claude Code or Codex to flash the open-source xiaozhi-esp32 firmware onto an ESP32-S3 development board, then set it up via phone Wi-Fi configuration, bind it to a backend dashboard, authenticate with GitHub, and upgrade the language model for free — turning the board into a desktop AI voice assistant.

@wquguru: https://x.com/wquguru/status/2110601298488021452

X AI KOLs Timeline

An ESP32 primer sparked by the incident of a 97-yuan recording device (XIAO ESP32-S3 Sense) found in OpenAI's office, covering chip architecture in detail, the firmware flashing process, how to use AI to assist development, and five low-cost hands-on projects.

Automating Wi-Fi setup testing on the ESP32

Hacker News Top

Groundrun 的这篇博客展示了如何在 ESP32-C6 上自动化 Wi-Fi 配网测试,覆盖 BLE、Soft AP、SmartConfig、Captive Portal 和 WPS 五种方式,并用 Claude 生成配套的 Android 应用与固件代码。