blink NeoPixel LEDs beautifully.
This is a LED library for Arduino or compatible boards. This library requires Adafruit NeoPixel Library. Please install it before using this library.
Clone this repository to a following directory.
/Users/YOUR_USER_NAME/Documents/Arduino/libraries/
(for those who use Mac. )
Please google "Where to install Arduino additional libraries on Windows PC?" if you use Windows PC.
Insert a following line to top of your sketch.
#include <EmotionalBlink.h>
Before call the functions, initialize NeoPixel LEDs. In this case, the number of LED is just 1. But you can use this library for also multiple LEDs.
#define PIN D8
#define NUMLED 1
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMLED, PIN, NEO_RGB + NEO_KHZ800);
Call functions like following...
// one-time red blinking.
Blink.softly(&pixels, NUMLED, 255, 255, 0);
// Blink like party people(パリピ) for 1sec. (a random color blinking)
Blink.likePartyPeople(&pixels, NUMLED, 1000);
Let's blink. そしてモテよう!
🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄
I just added a function for a holiday season!
🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄🎄
Use it like this.
#include <Adafruit_NeoPixel.h>
#include <EmotionalBlink.h>
#define PIN 3
#define NUMLED 30
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMLED, PIN, NEO_RGB + NEO_KHZ800); //おまじない
void setup() {
pixels.begin();
}
void loop() {
Blink.likeHolidaySeason(&pixels, NUMLED, 1000);
}
Just call Blink.likeHolidaySeason()
and your christmas tree will blink holier.
A HAPPY HOLIDAY!