Skip to content

felixthecat8a/FelixTheCatLED

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FelixTheCatLED

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

An Arduino Library for LED Control

Installation

Install via ZIP file

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

Implementation

BlinkLED.ino

#include <FelixTheCatLED.h>

#define LED_PIN 6
FelixTheCatLED::LED led(LED_PIN);

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

void loop() {
  led.on();
  delay(1000);
  led.off();
  delay(1000);
}

FadeLED.ino

#include <FelixTheCatLED.h>

#define LED_PIN 3 // Choose a PWM Pin denoted by ~
FelixTheCatLED::PWM led(LED_PIN);

int brightness = 0;
int step = 1;

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

void loop() {
  led.setBrightness(brightness);
  brightness += step;
  if (brightness <= 0 || brightness >= 255) {
    step = -step; // Reverse direction at limits
    delay(100); // Add a small delay for visibility
  }
  delay(10);
}

About

An Arduino Library for LED Control

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages