This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void confettiandsinelon() | |
{ | |
// a colored dot sweeping back and forth, with fading trails | |
fadeToBlackBy( leds, NUM_LEDS, 10); | |
int pos1 = beatsin16(4, 0, NUM_LEDS - 1); //beats_per_minute, uint16_t lowest=0, uint16_t highest=65535, uint32_t timebase=0, uint16_t phase_offset=0 | |
leds[pos1] += CHSV( gHue, 255, 192); | |
int pos2 = random16(NUM_LEDS); | |
int pos3 = random16(NUM_LEDS); | |
int pos4 = random16(NUM_LEDS); | |
EVERY_N_MILLIS(200) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************************************** | |
Example sketch for the MPU9250_WE library | |
This sketch shows how to obtain raw accleration data and g values from | |
the MPU9250. | |
For further information visit my blog: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Setup the output PWM pin | |
const int outputPin = 9; | |
// The number of Steps between the output being on and off | |
const int pwmIntervals = 100; | |
// The R value in the graph equation | |
float R; | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LED_PIN 10 | |
#define NUM_LEDS 300 | |
#define BRIGHTNESS 55 | |
#define LED_TYPE WS2812B | |
#define COLOR_ORDER GRB | |
CRGB leds[NUM_LEDS]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <FastLED.h> | |
#define LED_PIN 10 | |
#define NUM_LEDS 300 | |
#define BRIGHTNESS 55 | |
#define LED_TYPE WS2812B | |
#define COLOR_ORDER GRB | |
CRGB leds[NUM_LEDS]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CRGB base[NUM_LEDS]; | |
int8_t delta = 1; // 1 or -1. (Negative value reverses direction.) | |
#define RATE 20 //how fast patern moves (smaller number is faster) | |
//uint16_t StartPosition = 3; | |
//uint16_t pos = 0; // A pixel position. | |
void JellyFishBase() { | |
fill_solid( base, NUM_LEDS, CRGB::Red); // base color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <FastLED.h> | |
CRGBPalette16 sweep = CRGBPalette16( | |
CRGB::Blue, | |
CRGB::Green, | |
CRGB::Green, | |
CRGB::Green, | |
CRGB::Green, | |
CRGB::Green, | |
CRGB::Green, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//*************************************************************** | |
// Moving simple pattern | |
// It will wrap around, and the direction can be reversed. | |
// This is done a bit different then you might expect as I'm | |
// filling a seperate CRGB array with the custom colors/pattern | |
// just once in setup(). Then coping that into the main leds | |
// array as needed when moving it around. There are certanly | |
// fancier ways to do this, but this gets a simple pattern like | |
// going quickly. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mover- | |
By: Andrew Tuline | |
Date: February 2015 | |
This is a simple pixel moving routine for those of you that just like to count pixels on a strand. | |
I prefer to use sine waves as they provide a LOT of flexibility with less code for moving pixels around. |