Skip to content

Repository files navigation

Lpf2 Library for ESP32

PlatformIO Registry

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


Documentation

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

Credits

Disclaimers

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this project.

License

GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE.

About

A library for controlling and emulating LEGO Power Functions 2.0 devices (hubs, motors, sensors...) with an esp32

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages