A blur for use with (physical) circular LED arrays.

A blur for use with (physical) circular LED arrays. Change “b < 16” for the amount of blur. The rather out of focus photo is the result — only 4 LEDs were lit before the blur (red, green, blue and a white)

//blur
for(int b = 0; b < 16; b++) {
for(int x = 0; x < NUM_LEDS; x++) {
temp[x] = leds[x] + (leds[(((x-1)%NUM_LEDS)+NUM_LEDS)%NUM_LEDS]%10) + (leds[(x+1)%NUM_LEDS]%10);
}
memcpy8(leds, temp, sizeof(leds));
}

Looks interesting, but unfortunately, didn’t compile on an UNO.

My setup is a Teensy 3.1 with FastLED 2.1

Only other thing is that you need to setup a global CRGB array called temp — or you could stick it in after the first for loop.

Not sure how processor intensive the blur is — it may stress an UNO with big numbers

Must be the Teensy, as I’m using FastLED 2.1. Here’s my full program at http://pastebin.com/nd1LnLXW

Odd — it’s not exactly complex.

What is the compiler saying?

You’re missing a curly bracket before the mencpy8 line.

Was out for a while. Added the bracket and here’s the compiler results:

Compiling fastblur…
Creating C:\Users\Andrew\Documents\Arduino_Build\fastblur\fastblur.ino.cpp.o…
C:\Users\Andrew\Documents\Arduino_Build\fastblur\fastblur.ino.cpp: In function ‘void blur()’:
C:\Users\Andrew\Documents\Arduino_Build\fastblur\fastblur.ino.cpp:59: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
E:\Program Files (x86)\Arduino\libraries\FastLED/pixeltypes.h:708: note: candidate 1: CRGB operator%(const CRGB&, uint8_t)
C:\Users\Andrew\Documents\Arduino_Build\fastblur\fastblur.ino.cpp:59: note: candidate 2: operator%(int, int)
C:\Users\Andrew\Documents\Arduino_Build\fastblur\fastblur.ino.cpp:59: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
E:\Program Files (x86)\Arduino\libraries\FastLED/pixeltypes.h:708: note: candidate 1: CRGB operator%(const CRGB&, uint8_t)
C:\Users\Andrew\Documents\Arduino_Build\fastblur\fastblur.ino.cpp:59: note: candidate 2: operator%(int, int)
[Stino - Error 1]

Hmmm, not sure! Maybe someone else can help — it doesn’t like the %s where I’m scaling down the colours

Even with the curly bracket, it wouldn’t compile on my machine - set to Atmega328p/16MHz.

Hmmmm— sorry for the bum steer— it works on my Teensy?!

I’m away this week so no playing with microprocessors sadly.

Andrew, all you need to do is to put a curly bracket at the very end of the program and it will compile…
just got mine going on an uno :slight_smile: I could not get it going either.

@Adam_bluebottleyello glad it wasn’t my code then :slight_smile:

Lovely effect , I still want to get a large neopixel ring :slight_smile:

I got it to compile with a pile of warnings (as a result of line 41) with FastLED 3.1 and IDE 1.6.3 on a Nano, but it doesn’t seem to do anything for me. Does someone have a complete .ino file on pastebin to show this off? My currently non-working one is at http://pastebin.com/nd1LnLXW

i think that what is wrong in the code is that you are trying to calcula a module of a CRGB value as an int value , the temp led is CRGB.