Wiki / Emitters
Arduino · ESP32 + LED
Status: ✅ works (community-proven)
An Arduino or ESP32 microcontroller driving a single LED is the most reliable VLL emitter: timing is microsecond-accurate with no browser jitter. The microcontroller toggles the LED in the VLL pattern, which the LEGO sensor reads as light pulses.
Wiring (minimal — no transistor)
GPIO → 220 Ω → LED anode, LED cathode → GND. A 5 mm LED at ~10–15 mA is within a pin's limit; the Micro Scout sensor is close, so no power LED needed.
- On 3.3 V boards (ESP32), a white LED is dim — use red/IR LED + ~150 Ω, or drive a white LED from 5V via a small transistor.
Boards
- Arduino Nano — cheapest wired option; send commands over USB serial or buttons.
- ESP32 ⭐ — Wi-Fi + Bluetooth; host a web UI (phone → its Wi-Fi → tap a command). Dual-core = Wi-Fi on one core, exact LED timing on the other. Compact all-in-one: M5Atom (built-in RGB LED) or M5StickC Plus2 (built-in IR LED + screen + battery).
- Power: USB / power bank / LiPo base.
Firmware
Port the VLL — Visible Light Link engine (vllInit/vll0/vll1/vllEnd) with delayMicroseconds(), plus the VLL opcode table and VLL checksum.
Best for
Perfect timing, optional wireless control, and invisible programming via IR LED (invisible VLL).
Emulating LEGO controllers ✅
One ESP32 + LED covers both optical channels (device-confirmed):
- VLL — baseband on/off (no carrier) on a visible or IR LED → program a Micro Scout. Decoded at 30–40 cm over invisible IR.
- 38 kHz IR — emulate the 9738 remote (opcode
0xD2,55 FF 00 D2 …frames) → drive a Scout / RCX at good range. Generate the carrier with the RMT peripheral; on some ESP32 variants bake the 38 kHz explicitly into the symbols rather than trusting the carrier/LEDC peripheral, which can be unreliable. A Web-Serial page can build the frames and stream them to the board. - Aim & role: VLL needs point-blank direct aim (suits a handheld host); the 38 kHz remote is aim-forgiving. A board with no IR receiver is TX-only — it can command bricks but can't read sensors or do firmware/program download.
Links
- JorgePe/mindstorms-vll — VLL emitter code
- ESP Web Tools — flash ESP firmware from the browser