General purpose knob

Multi-app-hub-control

ย 

๐ŸŽฏ The Origin Story

I initially set out to build a simple Pomodoro timer to boost my productivity (with an endless pool of projects to tackle). But after doing some research, I realized it wasnโ€™t exactly groundbreaking, everyone had already built one or better, knob-based devices are especially popular in the maker community.

So, in search of a reason to stand out in this vast sea of incredible projects, I decided not to focus solely on functionality. Instead, I aimed to create a reusable and scalable framework for knob-based device.

If you ever use this to build your own embbeded device, Iโ€™d be genuinely thrilled!

Core Components

  • Hardware Abstraction Layer (HAL): Clean interfaces for display, encoder, RGB, buzzer
  • Services: High-level abstractions (RGB patterns, tune player, display management)
  • Apps: Self-contained applications with standardized lifecycle
  • Handlers: Coordinate between hardware events and app logic
  • Service Registry: Dependency injection system for shared resources

๐ŸŽฏ Technical Highlights

For Software Engineers & Recruiters

Architecture & Design Patterns

  • SOLID Principles: Interface segregation, dependency injection, single responsibility
  • Factory Pattern: Hardware abstraction and initialization
  • Observer Pattern: Timer-based update system
  • State Machine: Complex UI state management (see PomodoroSettingsFSM)

Embedded Systems Expertise

  • Interrupt Handling: Proper ISR implementation with flags
  • Real-time Coordination: Timer-based multi-service orchestration
  • Hardware Abstraction: Clean separation between hardware and business logic
  • Memory Management: Efficient resource usage on constrained hardware

Modern C++ Practices

  • RAII: Resource management through constructors/destructors
  • Templates & Inheritance: Clean polymorphic interfaces
  • Const Correctness: Proper use of const methods and parameters
  • Type Safety: Strong typing for display data and configuration

Communication Protocols

  • SPI: TFT display communication
  • I2C: Sensor integration ready
  • Bluetooth Low Energy: HID device implementation
  • PWM: RGB LED and buzzer control

Genesis Knob System Architecture

Professional Embedded Systems Platform with Enterprise-Grade Design Patterns

Application Layer

MODULAR

๐Ÿ…Pomodoro Timer

Real-time productivity timer with FSM implementation and persistence

State Machine Real-time Persistence

๐Ÿ”ŠVolume Controller

BLE HID implementation with cross-platform compatibility

BLE HID Cross-platform Low Latency

๐Ÿ Home Navigator

Dynamic app launcher with circular UI patterns

UI Framework Dynamic Loading

Service Layer

SOA PATTERN

๐Ÿ“บDisplay Service

Hardware-accelerated graphics with smooth animations

DMA Acceleration Double Buffer 40MHz SPI

๐ŸŽจRGB Service

Multi-channel PWM with gamma correction

16-bit PWM Gamma Correction

โ™ชTune Service

PWM audio synthesis with dynamic intervals

PWM Synthesis Dynamic Timing

๐Ÿ“กHID Service

Professional BLE stack with security

BLE 5.0 Security Level 3

Handler & Orchestration Layer

REAL-TIME

โฑ๏ธTimer Handler

Hardware timer ISR with microsecond precision scheduling

Hardware ISR ยตs Precision Dynamic Intervals

๐ŸŽ›๏ธEncoder Handler

Interrupt-driven input with debouncing and gesture recognition

Interrupt Driven Debouncing Gesture Recognition

๐Ÿ—๏ธService Registry

Dependency injection with lifecycle management

DI Pattern Lifecycle Mgmt

Hardware Abstraction Layer (HAL)

PORTABLE

๐Ÿ–ฅ๏ธDisplay Driver

TFT_eSPI integration with hardware acceleration

SPI DMA Hardware Accel

๐Ÿ”„Rotary Encoder

Quadrature decoding with interrupt optimization

Quadrature Decode IRAM ISR

๐Ÿ’กPWM RGB LED

Multi-channel PWM with high-resolution output

Multi-channel High Resolution

๐Ÿ”ŠPWM Buzzer

Audio synthesis via high-frequency PWM modulation

Audio Synthesis PWM Modulation

Architecture Strengths for Engineering Applications

๐Ÿ—๏ธ Professional Design Patterns

SOLID principles, Factory pattern, Service-Oriented Architecture, and Dependency Injection demonstrate enterprise-level software engineering expertise.

โšก Real-Time Performance

Hardware timer ISRs, deterministic scheduling, and microsecond precision timing suitable for robotics and industrial control applications.

๐Ÿ”ง Hardware Abstraction

Clean HAL implementation enables rapid prototyping and hardware platform migration - critical for product development cycles.

๐ŸŒ Multi-Protocol Communication

BLE HID, SPI, I2C, and UART implementations demonstrate versatility in communication protocol integration.

๐Ÿง  Advanced State Management

Hierarchical FSM implementation with guard conditions and event-driven architecture applicable to robot behavior programming.

๐Ÿ“Š Scalable Architecture

Modular design supports rapid feature addition and system expansion - ideal for evolving product requirements.

Comment (1)

  1. I am happy to see the level of details presented on your journey making this project !
    High level enough for any public to understand what is it that you are building
    and at the same time,
    detailed and long enough so that anyone can probe that you understand what you are building and what skills you are able to use.

    Nice job !

Leave a Reply

Your email address will not be published. Required fields are marked *