//SinDots
//16x16 rgb led matrix demo
//Yaroslaw Turbin 02.09.2020
//https://vk.com/ldirko
//https://www.reddit.com/user/ldirko/


#include <FastLED.h>
CRGB d[256];
byte i,t,u;
void setup(){LEDS.addLeds<WS2812,3,GRB>(d,256);}
void loop(){t=millis()/15;
u=t*2;
for(i=13;i--;)d[XY(sin8(t+i*20)>>4,sin8(u+i*20)>>4)].setHue(i*19);
for(i=13;i--;)d[XY(256-sin8(t+i*20)>>4,sin8(u+i*20)>>4)].setHue(i*19);
blur2d(d,16,16,32);
LEDS.show();}
int XY(byte x,byte y){return(y*16+x);}