Skip to content

Instantly share code, notes, and snippets.

@chemdoc77
chemdoc77 / CD77_police_light_one_Button_Color_Change.ino
Created January 30, 2019 17:26
The following sketch contains various functions based on the CD77_Police_Lights_One functions, from my original sketch in GitHub, CD77_police_lights. It includes color change by button.
// Police_Lights_One with Button Color Control by Chemdoc77
// Includes new functions for various number of pixels that are on in a group and for forward and reverse directions along with the ability to change colors with a button.
// ******** Version 20190130 *************
/* This code is based on the police_lightsONE and police_lightsALL code:
in Funkboxing by Teldredge at:
http://funkboxing.com/wordpress/wp-content/_postfiles/sk_qLEDFX_POST.ino
@chemdoc77
chemdoc77 / CD77_police_light_one_auto_color_change.ino
Last active February 4, 2019 11:40
The following sketch contains various functions based on the CD77_Police_Lights_One functions, from my original sketch in GitHub, CD77_police_lights. It includes automatic color change.
/* CD77_police_light_one_auto_color_change by Chemdoc77
Includes new functions for various number of pixels that are on in a group and for forward and reverse directions.
Includes automatic color change with seconds input. See line 42 for this variable.
******** Version 20190203 *************
This code is based on the police_lightsONE and police_lightsALL code:
in Funkboxing by Teldredge at:
@chemdoc77
chemdoc77 / CD77_Special_Request_Red_White_and_Blue_using_CRGBSet.ino
Last active August 27, 2019 18:03
Special Request to fill NeoPixel strip with one third red, one third white and one third blue.
// special request - fill NeoPixel strip with one third red, one third white and one third blue.
// by Chemdoc77
//This was run on a Teensy 3.6 using the Arduino 1.8.3 and the Teensyduino 1.37
#include "FastLED.h"
#define NUM_LEDS 240
#define Data_Pin 6
#define chipset NEOPIXEL
@chemdoc77
chemdoc77 / CD77_basic_half_ring_animations.ino
Last active December 20, 2019 17:23
Basic FastLED Aminations for a ring and for half a ring by Chemdoc77
// Basic FastLED Aminations for a ring and for half a ring by Chemdoc77
// This will work on a strip, too.
#include <FastLED.h>
#define DATA_PIN 6
#define LED_TYPE NEOPIXEL
#define NUM_LEDS 24
CRGB leds[NUM_LEDS];
int brightness = 30;
@chemdoc77
chemdoc77 / CD77_Fire2012WithPalette_for_two_halves_of_ring.ino
Last active February 4, 2020 03:00
Fire2012 With Palette for two halves of a ring by Chemdoc77
//Fire2012 with Palette for two halves of a ring or strip by Chemdoc77
// Modified version of Fire2012withPalette by Mark Kriegsman at:
// https://github.com/FastLED/FastLED/blob/master/examples/Fire2012WithPalette/Fire2012WithPalette.ino
/* ===== Note ==========
Change line 83 to pick color of the flame
Change lines 129 and 134 to adjust the flame.
*/
@chemdoc77
chemdoc77 / CD77__special_request_changing_colors_after_long_period_of_time.ino
Created July 19, 2020 22:02
CD77 Special Request for Changing Colors After a Long Period_of Time
/* This sketch by Chemdoc77 is a special request for changing colors after a long period of time.
It is based on Mark Kriegsman's PaletteCrossfade.ino and his PerformanceTime code at;
https://gist.github.com/kriegsman/1f7ccbbfa492a73c015e
and
https://gist.github.com/kriegsman/a916be18d32ec675fea8
*/
#include <FastLED.h>
#define LED_PIN 6
@chemdoc77
chemdoc77 / CD77_new_product_test__Teensy4.ino
Last active July 11, 2021 10:29
FastLED and Teensy 4.0 Parallel Output Procedure
/* New Product Test Sketch by Chemdoc77
used to test new RGB LED strips and Matrix that I purchase.
Note: Uses FastLED's Parallel Output procedure to work with a Teensy 4.0
*/
#include <FastLED.h>
#define DATA_PIN 7 // it is critical that you use this pin number or other pin numbers using FastLED's Parallel Output procedure
@chemdoc77
chemdoc77 / CD77_Palette_slow_fade_to_diff_colors.ino
Last active December 31, 2021 03:09
Using Palettes to slow fade to different colors
// This sketch by Chemdoc77 is based on Mark Kriegsman's PaletteCrossfade.ino
// It uses palettes to slow fade to different colors.
// at: https://gist.github.com/kriegsman/1f7ccbbfa492a73c015e
#include <FastLED.h>
#define LED_PIN 6
#define NUM_LEDS 24
@chemdoc77
chemdoc77 / CD77_FastLED_millis_replaces_delay.ino
Last active March 13, 2022 23:33
CD77_FastLED_millis_replaces_delay - Replaces delays with FastLED EVERY_N_MILLIS function
/* EVERY_N_MILLIS_I used to replace delay by Chemdoc77
Updated 20220313- replaced EVERY_N_MILLIS with EVERY_N_MILLIS_I
Note: When using the N_Millis FastLED function in a void funcition, you must use
EVERY_N_MILLIS_I and NOT EVERY_N_MILLIS.
*/
#include "FastLED.h"
#define NUM_LEDS 24
#define DATA_PIN 6
#define LED_TYPE NEOPIXEL
@chemdoc77
chemdoc77 / CD77_step_project_examples_with_CRGBSet.ino
Last active May 23, 2022 01:10
Step Project Examples with CRGBSet Arrays
// Step Project Array Code Example
// by Chemdoc77
#include "FastLED.h"
#define NUM_LEDS 390
#define Data_Pin 6
#define chipset NEOPIXEL
#define BRIGHTNESS 50
// CRGBSET Stuff