Skip to content

Instantly share code, notes, and snippets.

if (setEffect == "Red Green White Loop") {
static uint8_t startIndex = 0;
startIndex = startIndex + 1; /* higher = faster motion */
Serial.print("x");
// First slide the led in one direction
for(int i = 0; i < NUM_LEDS; i++) {
// Set the i'th led to red
leds[i] = CRGB(255, 0, 0);
// Show the leds
FastLED.show();
anonymous
anonymous / index.html
Created October 9, 2015 22:10
GISTS // source https://jsbin.com/hihoke
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>GISTS</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<style>