LPF2 (LEGO Power Functions 2 / PoweredUp) communication library for ESP32. Supports:
- Driving physical LPF2 devices over UART (
Local::Port) - Reading sensors and controlling motors attached to LEGO Hubs over BLE (
Remote::Port) - Emulating a LEGO Hub (
HubEmulation) - Presenting the ESP32 as a custom LPF2 device to any host hub or controller (
Local::EmulatedPort)
Download from the PlatformIO registry: rbel12b/Lpf2
| Doc | Contents |
|---|---|
| Architecture | Class hierarchy, port types, data flow diagrams |
| Getting Started | Installation, build flags, required startup calls |
| Local Port (Master) | Drive a physical LPF2 device over UART |
| Emulated Port (Slave) | Present the ESP32 as a custom LPF2 device |
| Remote Port | Control devices through a LEGO Hub over BLE |
| Virtual Port | Expose ports/devices on a hub emulated by HubEmulation |
| Device Manager & Capabilities | Auto device lifecycle, capability interface, RTTI alternative |
| Custom Device | Add a new typed device + factory |
| Logging | Compile-time and runtime log level, output destination |
- Legoino by Cornelius Munz — reference and base for LWP hub control/emulation
- LEGO Wireless Protocol documentation
- LEGO PoweredUp UART Protocol by the pybricks team
- NimBLE-Arduino by h2zero (Ryan Powell)
LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this project.
GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE.