Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //There are 2 programs here, duh.
- //SICK LED SIN PATTERN feat. Madison
- #include <FastLED.h>
- CRGB leds[5];
- int t;
- void setup() {
- FastLED.addLeds<NEOPIXEL, 2>(leds, 5);
- t = 0;
- for (int i = 0; i < 5; i++) {
- leds[i] = CRGB::Red;
- }
- }
- void loop() {
- for (int i = 0; i < 5; i++) {
- leds[i].r = 0.2*sin8(t + i * 20);
- leds[i].g = 0.2*sin8(2 * t + i * 15);
- leds[i].b = 0.1 * sin8(2 * t + i * 20);
- }
- delay(10);
- t++;
- FastLED.show();
- }
- //SICK GAUSSIAN WAVE PACKET feat. Madison again
- #include <FastLED.h>
- CRGB leds[5];
- int t;
- void setup() {
- FastLED.addLeds<NEOPIXEL, 2>(leds, 5);
- t = 0;
- for (int i = 0; i < 5; i++) {
- leds[i] = CRGB::Red;
- }
- }
- void loop() {
- for (int i = 0; i < 5; i++) {
- leds[i].r = 50 * exp(-0.2 * pow((i - fmod(0.1*t,14)+7) , 2));
- leds[i].b = 50 * exp(-0.2 * pow((i - fmod(0.1*(t+45),14)+7) , 2));
- leds[i].g = 50 * exp(-0.2 * pow((i - fmod(0.1*(t+90),14)+7) , 2));
- }
- delay(20);
- t++;
- FastLED.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment