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
/* use this code in Arduino | |
for (int i=0; i <NUM_LEDS; i++) | |
{ leds[i] = ColorFromPalette( currentPalette, map(i, 0, NUM_LEDS, 0, 255), brightness, map(i, 0, NUM_LEDS, 0, 255)); | |
} | |
*/ | |
// blend doesn't seem to be implemented/necessary in CRGBPalette, so I left it out | |
// Probably this can be optimized? See questions in comments. | |
CRGB ColorFromPalette( const CRGBPalette256& pal, uint8_t index, uint8_t brightness, uint8_t saturation) |
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
// Check: https://plus.google.com/+KasperKamperman/posts/NmCDNXUVHYs | |
// #include "FastLED.h" | |
uint8_t inputValues[7] = {0, 30, 64, 128, 192, 221, 255}; | |
int contrastValue = 8; | |
void setup() { | |
Serial.begin(57600); |
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
// get a colorname from a random color, for example to use as search string | |
// arrays can be filled with more descriptors | |
// a multidimensional array might be nice. | |
// Kasper Kamperman, 27-01-2015 | |
// make sure the two arrays have the same length and the name describes the colorHex. | |
color [] colorHex = { #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff }; | |
String [] colorName = { "red", "yellow", "green", "cyan", "blue", "purple" }; |
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
// this code is not a working sketch | |
int circularBufferSize; | |
int circularBufferIndex; | |
int [][] circularBuffer; | |
circularBufferSize = 512; | |
circularBufferIndex = 0; | |
circularBuffer = new int [6][circularBufferSize]; |
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
/* | |
Problem. Why I see a light image of me, while I do a difference on exactly the same | |
images. | |
OpenCV for Processing 0.5.2 by Greg Borenstein http://gregborenstein.com | |
Using Java OpenCV 2.4.5.0 | |
Processing 3.0a4 | |
*/ |
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
// https://developer.spotify.com/web-api/endpoint-reference/ | |
JSONObject json; | |
PImage [] albumCovers; | |
//Bubble[] bubbles; | |
void setup() { | |
size(640,480); |
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
/* Value Monitor Example | |
*/ | |
ValueMonitor [] valueMonitorArray = new ValueMonitor[2]; | |
void setup() { | |
size(640, 480); | |
frameRate(25); | |
// place ValueMonitor objects on the screen, for some graphical feedback |
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
// https://developer.spotify.com/web-api/get-track/ | |
// http://code.compartmental.net/minim/minim_method_loadfile.html | |
import ddf.minim.*; | |
import ddf.minim.effects.*; | |
Minim minim; | |
AudioPlayer groove; | |
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
/* Use ControlP5 annotations to make a control panel for FastLED. | |
Uses a protocol of 12 bytes. | |
Protocol description: | |
https://drive.google.com/file/d/0B3Tn6oRmh71oS3FNQ2hsODVwS1E | |
Arduino code: | |
https://gist.github.com/kasperkamperman/7e827bb481dfcdb4cb52 | |
*/ |
OlderNewer