Skip to content

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

Implementation

RGB LEDs & Colors

#include <Felix8A.h>

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

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

const Felix8A::Palette ColorPalette(colorArray);

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

void loop() {
    // loop code
    for (int 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() {
    // setup code
    led.begin();
}

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

Button Inputs

#include <Felix8A.h>

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

void setup() {
    // setup code
    led.begin();
    bttn.begin();
}

void loop() {
    // loop code
    bttn.update();

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

About

A lightweight Arduino toolkit designed to simplify handling common components and utilities used across embedded projects.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages