Skip to main content

Introduction

AutoLight is a comprehensive LED matrix control system built on the Kinematrix framework, designed for automotive and industrial applications. It provides intelligent LED control with hardware I2C expansion, dynamic configuration, and web-based management.

AutoLight V3

Current generation with dynamic PCF distribution and multi-modal buttons

Web Client

Next.js web interface with Pattern Builder for LED sequence development

Pattern Builder

Visual and code-based LED pattern creation tools

REST API

Complete API reference for device control and monitoring

Four Generations of Evolution

AutoLight represents four generations of LED control evolution, each building upon the previous while maintaining backward compatibility:

AutoLight V1 - Foundation Architecture

Key Features:
  • Foundation architecture with “Keed” naming convention
  • 24 channels, 3 PCF8574 I2C expanders
  • Hardcoded LED sequences
  • Basic 4-button control (ON/OFF/NEXT/PREV)
#define ENABLE_ADDONS_AUTOLIGHT
#include "Kinematrix.h"

KeedConfiguration cfg;
KeedAutoLight led;

void setup() {
    configuration_t config;
    config.sequence = 0;
    config.setDelay(50);
    cfg.setConfig(config);
    led.setConfiguration(&cfg);
    led.begin();
}

AutoLight V2 - Web Connectivity

Key Features:
  • Web interface and namespace organization
  • 64 channels, 8 PCF8574 expanders
  • FreeRTOS task management
  • Integrated web server
#define ENABLE_ADDONS_AUTOLIGHT_V2
#include "Kinematrix.h"
using namespace AutoLight;

BaseConfig config;
BaseChannel channel;

void setup() {
    config.setConfigIndex(I2C_CONFIG);
    channel.setConfig(&config);
    channel.begin();
    // Web server automatically initialized
}

AutoLight V3 - Dynamic Distribution

Current Generation - See AutoLight V3 for complete documentation. Key Features:
  • Dynamic PCF8574 distribution with 4 strategies
  • Multi-modal button system (5 modes)
  • Integrated REST API server (port 8000)
  • CLI interface via SerialCommander
  • 64 channels, 8 PCF expanders

AutoLight V4 - Fully Dynamic (Future)

Key Features:
  • Zero-configuration automatic mode
  • 128 channels, 16 PCF expanders
  • Auto-detection and auto-distribution
  • Intelligent auto-fixing
  • Builder pattern configuration
#define ENABLE_ADDONS_AUTOLIGHT_V4
#include "Kinematrix.h"
using namespace AutoLight;

AutoLightV4 led(true); // Enable debug

void setup() {
    // Zero-configuration automatic mode
    led.autoScan();       // Auto-detect hardware
    led.autoDistribute(); // Auto-distribute channels
    led.begin();          // Ready to use!
}

Hardware Platform Support

Primary Platform - Full feature support
  • All AutoLight versions (V1-V4)
  • FreeRTOS task management
  • WiFi AP/STA modes
  • Web server and REST API
  • Up to 128 channels (V4)
  • Hardware I2C with multiple PCF8574 expanders
Recommended for: Production deployments, web-enabled projects, V3/V4 features

LED Sequence System

All AutoLight versions support 16 total lighting modes:
Complete OFF state - all channels disabled
Static ON - all channels continuously high
14 customizable LED sequence patterns:
  • Mode 2: Blink all channels simultaneously
  • Mode 3: Fill from two points (center outward)
  • Mode 4: Fill from right to left
  • Mode 5: Fill from both ends inward
  • Mode 6: Blink one LED at a time sequentially
  • Mode 7: Blink two LEDs while filling
  • Mode 8: Snake pattern with reverse
  • Mode 9: Random LED activation
  • Mode 10: Wave propagation effect
  • Mode 11: Complex multi-pattern coordination
  • Mode 12: Advanced pattern matrix
  • Mode 13: Custom blink patterns
  • Mode 14: Advanced pattern combinations
  • Mode 15: All sequences in rotation
Each sequence is fully customizable and can be created using the Pattern Builder.

Key Architectural Patterns

Progressive Enhancement

Each version maintains 100% backward compatibility while adding revolutionary features:

Modular Component Design

All versions follow consistent component organization:
{Version}/
├── index.h                 # Component orchestration
├── Channel/               # LED control logic
├── Config/                # Configuration management
├── Cores/                 # System services
├── Log/                   # Debug logging
└── CLAUDE.md              # Documentation

Hardware Abstraction System

  • I2C Expansion: PCF8574 I/O expander support (8-128 channels)
  • Dynamic Distribution: Intelligent channel allocation across multiple PCFs
  • Platform Support: ESP32 primary, ESP8266/AVR compatibility
  • Button Systems: 1-4 button configurations with 5 interaction modes

Development Guidelines

Version Selection Strategy

New Projects

Use AutoLight V4 for maximum capabilities and intelligent auto-configuration

Production Systems

Use AutoLight V3 for robust features with proven stability and web integration

Legacy Systems

V3 for dynamic features, V2 for web requirements, V1 for simple control

Educational

Start with V1, progress through versions to understand evolution

Memory Optimization

Each AutoLight version adds ~50-100KB to your firmware. Enable only the required version:
// Enable only one version
#define ENABLE_ADDONS_AUTOLIGHT_V3
#include "Kinematrix.h"

Platform Considerations

PlatformV1V2V3V4Recommended Use
ESP32All versions, full features
ESP8266⚠️V1/V2 only, limited
AVRNot supported

Integration with Kinematrix

Enable Flags

// Individual version enables
#define ENABLE_ADDONS_AUTOLIGHT      // V1
#define ENABLE_ADDONS_AUTOLIGHT_V2   // V2
#define ENABLE_ADDONS_AUTOLIGHT_V3   // V3
#define ENABLE_ADDONS_AUTOLIGHT_V4   // V4

Include Patterns

#include "addons/AutoLight.h"     // V1
#include "addons/AutoLightv2.h"   // V2
#include "addons/AutoLightv3.h"   // V3
#include "addons/AutoLightv4.h"   // V4

Namespace Usage

  • V1: Global namespace with “Keed” prefix
  • V2-V4: AutoLight namespace for clean organization
using namespace AutoLight;  // For V2, V3, V4

Build Commands

All AutoLight versions are built using PlatformIO:
# Build the project (includes all enabled addons)
pio run

# Build for specific environments
pio run -e esp32doit-devkit-v1
pio run -e nodemcuv2

# Upload to device
pio run --target upload

# Monitor serial output
pio device monitor

# Combined workflow
pio run --target upload && pio device monitor

Next Steps

Get Started with V3

Learn about AutoLight V3 firmware architecture and features

Web Interface

Explore the Next.js web client for device control

Create Patterns

Use the Pattern Builder to design custom LED sequences

API Reference

Complete REST API documentation for integration

Build docs developers (and LLMs) love