This file contains hidden or 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 <Arduino.h> | |
#include <Wire.h> | |
void setup() | |
{ | |
Wire.begin(); | |
Serial.begin(9600); | |
while (!Serial); | |
Serial.println("\nI2C Scanner"); | |
} |
This file contains hidden or 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
#define FASTLED_SHOW_CORE 0 | |
/ -- Task handles for use in the notifications | |
static TaskHandle_t FastLEDshowTaskHandle = 0; | |
static TaskHandle_t userTaskHandle = 0; | |
void FastLEDshowESP32() | |
{ | |
if (userTaskHandle == 0) { | |
const TickType_t xMaxBlockTime = pdMS_TO_TICKS( 200 ); |
This file contains hidden or 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
#define FASTLED_ESP8266_NODEMCU_PIN_ORDER | |
#define FASTLED_ALLOW_INTERRUPTS 0 | |
#include "FastLED.h" | |
#include <Arduino.h> | |
#include <ESP8266mDNS.h> | |
#include <ESP8266WiFi.h> | |
#include <Thread.h> | |
#include <ThreadController.h> | |
#include <WebSocketsServer.h> |
This file contains hidden or 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
/* inoise8_mover_array | |
* | |
* By: Andrew Tuline | |
* | |
* Date: March, 2017 | |
* | |
* We've used sine waves and counting to move pixels around a strand. In this case, I'm using FastLED Noise to move an array of pixels up and down the strand. | |
* | |
* The advantage is that it provides random natural movement without requiring lots of fancy math. | |
* |
This file contains hidden or 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" | |
// ColorWavesWithPalettes | |
// Animated shifting color waves, with several cross-fading color palettes. | |
// by Mark Kriegsman, August 2015 | |
// | |
// Color palettes courtesy of cpt-city and its contributors: | |
// http://soliton.vm.bytemark.co.uk/pub/cpt-city/ | |
// | |
// Color palettes converted for FastLED using "PaletteKnife" v1: |
This file contains hidden or 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 <stdio.h> | |
int movingAvg(int *ptrArrNumbers, long *ptrSum, int pos, int len, int nextNum) | |
{ | |
//Subtract the oldest number from the prev sum, add the new number | |
*ptrSum = *ptrSum - ptrArrNumbers[pos] + nextNum; | |
//Assign the nextNum to the position in the array | |
ptrArrNumbers[pos] = nextNum; | |
//return the average | |
return *ptrSum / len; |
This file contains hidden or 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
int redPin = 6; | |
int greenPin = 5; | |
int bluePin = 9; | |
float col[3]; | |
float hue = 0.0; | |
void setup() { | |
pinMode(redPin, OUTPUT); | |
pinMode(greenPin, OUTPUT); |
This file contains hidden or 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" | |
// This sketch shows one way to define a 'timed playlist' | |
// of animations that automatically rotate on a custom schedule. | |
// | |
// A "ResetPlaylist" method is provided so that the playlist can be | |
// restarted from a custom external trigger, e.g., a button or event. | |
// For demonstration purposes, the playlist is reset if the | |
// sketch receives a letter "r" on the serial port. | |
// |