Skip to content

Instantly share code, notes, and snippets.

@Anxvf1s
Anxvf1s / gist:0672d6fde09647c058ba1793236b77f8
Last active August 19, 2021 23:08
Basic 2 Leds only Blink out of 5
#include <FastLED.h>
#define LED_PIN 2
#define NUM_LEDS 5
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
@Anxvf1s
Anxvf1s / Police lights
Created June 7, 2021 00:20
Police lights
#include "FastLED.h"
// #include <Adafruit_NeoPixel.h>
#define NUM_LEDS 28
#define Data_Pin 3
// #define CLK_PIN 8
#define chipset WS2812
// #define COLOR_ORDER GRB
#define BRIGHTNESS 100
@Anxvf1s
Anxvf1s / 3 data pins used
Created July 9, 2018 18:13
3 data pins used.
#include <Adafruit_NeoPixel.h>
// Pattern types supported:
enum pattern { NONE, RAINBOW_CYCLE, THEATER_CHASE, COLOR_WIPE, SCANNER, FADE };
// Patern directions supported:
enum direction { FORWARD, REVERSE };
// NeoPattern Class - derived from the Adafruit_NeoPixel class
class NeoPatterns : public Adafruit_NeoPixel
{
//This works with 2 strips
#include "FastLED.h"
#define NUM_STRIPS 2
#define NUM_LEDS_PER_STRIP 24
#define NUM_LEDS NUM_LEDS_PER_STRIP * NUM_STRIPS
#define NUM_LEDS 28
#define Data_Pin 3
@Anxvf1s
Anxvf1s / Sound, lights and motor.
Created June 27, 2018 17:52
This is the kind of Sketch I would like work with Nano and addressable Led's.
// Tardis
//SFEMP3Library author Bill Porter
//SFEMP3Library author Michael P. Flaga
/* MP3 Player Shield Music Box Code Example:
SparkFun Electronics, Pamela, 1/24/2013
Beerware License
Hardware Connections:
-LED = D3 on MP3 Player Shield;
//Fusion drive test
#include "FastLED.h"
#define NUM_LEDS 10
#define Data_Pin 3
#define chipset NEOPIXEL
#define BRIGHTNESS 50