Skip to content

felixthecat8a/MiniNeoPixels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniNeoPixels

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

GitHub Created At GitHub commit activity

A lightweight library to control NeoPixels using an easy-to-use interface. This library wraps around Adafruit_NeoPixel, providing simple methods to control individual and groups of pixels with ease.

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.

Usage

#include "MiniNeoPixels.h"

#define PIXEL_PIN 3 // input pin Neopixel is attached to
#define PIXEL_COUNT 10 // number of neopixels in strip
MiniNeoPixels pixels(PIXEL_PIN, PIXEL_COUNT);
// Add types if different than default of NEO_GRB + NEO_KHZ800
//MiniNeoPixels pixels(PIXEL_PIN, PIXEL_COUNT, NEO_RGB + NEO_KHZ800);

#define PIXEL_BRIGHTNESS 50 // a brightness value from 0 - 255

void setup() {
  pixels.begin(PIXEL_BRIGHTNESS);
  pixels.clear(); // off
}

void loop() {
  pixels.red();
  delay(1000);

  pixels.all(255, 100, 0); // orange
  delay(1000);

  pixels.yellow();
  delay(1000);

  pixels.green();
  delay(1000);

  pixels.cyan();
  delay(1000);

  pixels.blue();
  delay(1000);

  pixels.magenta();
  delay(1000);
}

About

A lightweight library to control NeoPixels using an easy-to-use interface.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages