Skip to content

tp-firmware-v3.1.0

Latest

Choose a tag to compare

@ryanamaral ryanamaral released this 06 Nov 04:48
b0c30a7

🐒 TurtlPass Firmware v3.1.0 β€” Universal LED Framework & 130-Board Support

πŸš€ Overview

TurtlPass v3.1.0 delivers a major upgrade to the embedded LED system with a fully modular driver architecture and broad hardware compatibility.
This release unifies LED control across all supported RP2040 and RP2350 boards β€” from the Pico family to custom carrier designs β€” while maintaining smooth animations, low power usage, and easy extensibility.


✨ New in v3.1.0

🧩 Complete LED Driver Suite

TurtlPass now includes five fully implemented and interchangeable LED drivers:

Driver Purpose
AnalogLedDriver Basic single-pin brightness control
Cyw43LedDriver Onboard Wi-Fi status LED
Rgb3PinLedDriver Standard 3-pin RGB LED via PWM
FastLedDriver Addressable LED strip (WS2812/NeoPixel)
NullLedDriver No-op driver for headless / non-LED devices

Each driver conforms to the unified ILedDriver interface, ensuring drop-in replacement and consistent behavior across hardware variants.


πŸ’‘ Universal LED Manager

  • Centralized control via the updated LedManager class.

  • Unified color table shared by all drivers β€” nine vivid presets (Green, Yellow, Red, Blue, White, Violet, Orange, Aqua, Pink).

  • Intelligent brightness mapping for smoother fades and realistic pulsing.

  • Modular state machine supporting:

    • LED_ON
    • LED_OFF
    • LED_BLINKING
    • LED_PULSING
    • LED_FADE_OUT_ONCE
    • LED_FADE_OUT_LOOP

βš™οΈ Architecture & Refactor Highlights

  • Separation of Concerns:
    LedManager handles logic; each driver handles hardware.
  • Removed Duplication:
    Color constants now exist only in LedManager.
  • Refactored Brightness Handling:
    Exponential mapping and unified PWM scaling yield smoother transitions.
  • Simplified Integration:
    Drivers auto-register via the shared interface for easy runtime selection.

🧠 RP2040 / RP2350 Board Support

Full validation and LED compatibility for 130 boards, including:

  • Raspberry Pi Pico, Pico W, Pico 2, Pico 2 W
  • Adafruit Feather RP2040 / ItsyBitsy / QT Py
  • Seeed XIAO RP2040 / W
  • SparkFun Thing Plus RP2040
  • Waveshare RP2040 series
  • Pimoroni PicoSystem / Tiny2040 / Galactic Unicorn / Plasma2040
  • Custom boards built on the RP2350 MCU
  • and many more community variants

Boards are now auto-detected, selecting the correct LED driver at runtime.


🧰 Developer Notes

  • New API Contract:
    All drivers must implement:

    void begin();
    void setColor(uint8_t r, uint8_t g, uint8_t b);
    void setBrightness(uint8_t brightness);
    void show();
  • Optional Interface Extension:
    Drivers may optionally provide board-specific setup (e.g., Wi-Fi LED binding for Cyw43LedDriver).

  • Native Testing:

    • Native unit tests validate all LED states without hardware, ensuring correct timing, color, and brightness behavior.
    • Contract testing verifies full compliance of all ILedDriver implementations.