An Arduino utility toolkit for handling common components in embedded projects — including LEDs, RGB control, buttons, timing, and color utilities.
- Download the .zip file of the latest release.
- In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library....
- Select the downloaded .zip file.
To update the library:
- Go to Documents > Arduino > libraries > Felix8A and delete the existing Felix8A folder from your libraries directory.
- Follow the installation steps above to install the latest version.
Add the following to the project's platformio.ini file:
lib_deps =
https://github.com/felixthecat8a/Felix8A.git
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.
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.
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.
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.
Felix8A::wrap()– Wraps a value within a specified range.Felix8A::clamp()– Restricts a value to a specified minimum and maximum.
#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);
}
}#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();
}
}#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();
}
}