Skip to content

felixthecat8a/FelixTheCatLED

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FelixTheCatLED

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

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

An Arduino Library for LED Control

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. Delete the existing FelixTheCatLED folder from your libraries directory: Documents > Arduino > libraries > FelixTheCatLED
  2. Follow the installation steps above to install the latest version.

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 = brightness + step;
  if (brightness <= 0 || brightness >= 255) {
    step = -step;
  }
  delay(30);
}

About

An Arduino Library for LED Control

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages