Skip to content
felixthecat8aPublic

About

A lightweight Arduino toolkit for LED control, button interaction, and color management.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Felix8A

GitHub Release License: MIT GitHub repo size GitHub repo file or directory count GitHub code size in bytes GitHub top language

Check Arduino Compile Examples Spell Check

GitHub Created At GitHub commit activity GitHub last commit GitHub Release Date GitHub commits since latest release

An Arduino utility toolkit for handling common components in embedded projects — including LEDs, RGB control, buttons, timing, and color utilities.

Installation

Install via ZIP file

  1. Download the .zip file of the latest release.
  2. In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library....
  3. Select the downloaded .zip file.

Updating the Library

To update the library:

  1. Go to Documents > Arduino > libraries > Felix8A and delete the existing Felix8A folder from your libraries directory.
  2. Follow the installation steps above to install the latest version.

Add to PlatformIO Project

Add the following to the project's platformio.ini file:

lib_deps =
    https://github.com/felixthecat8a/Felix8A.git

Available Classes

LED & Output Control

  • Felix8A::LED – Individual LED control with on, off, and toggle functionality.
  • Felix8A::PWM – PWM output control for adjustable brightness and output levels.
  • Felix8A::RGB – Control of RGB LEDs with configurable channels and brightness.
  • Felix8A::Relay – Digital relay control.
  • Felix8A::Buzzer – Buzzer control for audible feedback.

Color Management

  • Felix8A::Color32 – A collection of lightweight, static utilities for 32-bit RGB color creation, manipulation, conversion, and interpolation.
  • Felix8A::Palette – Provides a lightweight interface for managing and accessing arrays of 32-bit colors.

Input & Interaction

  • Felix8A::Button – Push-button handling with debouncing and press, release, click, multi-click, and hold events.
  • Felix8A::Switch – Digital switch input handling.
  • Felix8A::LimitSwitch – Normally open and normally closed limit switch support.

Timing Utility Functions

Time8A provides convenient, non-blocking timing functions based on millis():

  • Time8A::every() - Checks whether a recurring time interval has elapsed.
  • Time8A::after() - Checks whether a specified duration has passed since a starting timestamp.
  • Time8A::reset() - Resets a timestamp to the current millis() value.
  • Time8A::once() - Triggers once after a specified interval, then automatically disarms the timer.
  • Time8A::arm() - Arms a one-shot timer by recording the current timestamp.
  • Time8A::disarm() - Disarms a one-shot timer.
  • Time8A::isArmed() - Checks whether a one-shot timer is armed.

Other Utility Functions

  • Felix8A::wrap() – Wraps a value within a specified range.
  • Felix8A::clamp() – Restricts a value to a specified minimum and maximum.

Implementation

RGB LEDs & Colors

#include <Felix8A.h>

Felix8A::RGB rgbLED(9, 10, 11);

const uint32_t colors[] = {
    Felix8A::Color::RED,
    Felix8A::Color::ORANGE,
    Felix8A::Color::GREEN,
    Felix8A::Color::BLUE,
    Felix8A::Color::WHITE
};

const Felix8A::Palette colorPalette(colors);

void setup() {
    rgbLED.begin();
}

void loop() {
    for (size_t i = 0; i < colorPalette.size(); i++) {
        rgbLED.setRGB(colorPalette[i]);
        delay(1000);
    }
}

LEDs

#include <Felix8A.h>

Felix8A::LED led(6);

const unsigned long blinkInterval = 1000;
unsigned long lastBlink = 0;

void setup() {
    led.begin();
}

void loop() {
    if (Time8A::every(blinkInterval, lastBlink)) {
        led.toggle();
    }
}

Button Inputs

#include <Felix8A.h>

Felix8A::LED led(6);
Felix8A::Button button(2);

void setup() {
    led.begin();
    button.begin();
}

void loop() {
    button.update();

    if (button.wasClicked()) {
        led.toggle();
    }
}

About

A lightweight Arduino toolkit for LED control, button interaction, and color management.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages