Profile cover photo
Profile photo
Jonas Vorwerk
Jonas's posts

Today it's a bad coding day, for some reason I can't figure out what goes wrong. Color palettes in an array, what's the correct syntax?

char *colorpalettelist[] = { "FairyLight_p", "warm_orange", "RedWhite_p"};
CurrentPalette = colorpalettelist[1]; //this doesn't work

The XYMatrix example is a great start for using matrixes and we use this principle a lot. But sometimes you would like to flip a matrix horizontally or vertically.

Does anybody has some spare code laying around to achieve this? Best would be without duplicate arrays but a straight honest and simple function. Maybe somebody already modified the XY function for this purpose? 

Post has attachment
Hey everybody,

I'm working on a new project and I'm using one of Adafruit's circuit playground dev boards. It's cheap, got 10 neopixels and a bunch of sensors. Really nice to play with and work great with Fastled.

The plan is to use the build in accelerometer to change to colours of the led according to the xy angle. This is fairly easy. See this code:

#include "Adafruit_CircuitPlayground.h"
#include "FastLED.h"

#define NUM_LEDS 10
#define DATA_PIN 17
#define BRIGHTNESS 64


float x, y, z, nx, ny, angle;

uint8_t hue = 70;
uint8_t sat = 255;
uint8_t val = 255;

void setup() {


void loop(){
// create color from angle
hue = map(getAngle(), 0, 359, 0, 255);

// change all leds to color
for( int i = 0; i < NUM_LEDS; i++) {
leds[i] = CHSV(hue, 255, 255);

// Get values from accelerometer and calculate the angle in 2D
int getAngle(){
x = CircuitPlayground.motionX();
y = CircuitPlayground.motionY();
z = CircuitPlayground.motionZ(); // We ignore the z axis

nx = x / 10.0;
ny = y / 10.0;
angle = atan((ny/nx)) * 180 / 3.14; // Figure out the angle of the accelerometer

if(angle > 0.0) { // Adjust based on arctangent function (in degrees)
if(nx < 0.0)
angle += 180;
else {
if(ny > 0.0)
angle += 180;
angle += 360;
if(angle == 360.0) // a 360 degree angle is the same as a zero degree angle
angle = 0;

return angle;

The next step would be to fade the color slowly according the angle of the board. This is trickier. Is there a function thats fades a pixel to a given color? Example the current hue = 100 but we want to go to 255 using the shortest route.

Does anybody has done this before or has a function to share?

Post has attachment
New Painting using fastled!

Post has attachment
Hey Everybody,
Is there support for the UCS2903IC chipset? 
Found some interesting leds which have this inside:

Post has attachment
Some experiments pt2. Bigger this time ;)

Post has attachment
For a project I'm looking into these, see picture. Is there support for UCS2903 ? 

Is it possible to do something like this?:
EVERY_N_MILLISECONDS( a_dynamic_maybe_even_random_variable ) {

Post has attachment
Just some experiments using fastleds ;)

Post has attachment
Hey everyone,
Would it be possible to use fastled to send out dmx?
For example, I've written a fastled arduino program and would like to keep the program as it is but the use dmx output to control big dmx controllable lights. I'm using a

Question two, does somebody has a function to convert HSV (0-255) values to RGB (0-255) values?

The best, Jonas
Wait while more posts are being loaded