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));
}
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]
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 I could not get it going either.
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