Advertisement
ldirko

With_Sin 278 byte

Dec 10th, 2020
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //With_Sin 278 byte
  2. //Fastled 16x16 rgb led matrix demo
  3. //Yaroslaw Turbin, 10.12.2020
  4. //https://vk.com/ldirko
  5. //https://www.reddit.com/user/ldirko/
  6.  
  7. //for one tweet codegolf competition
  8. //https://www.reddit.com/r/FastLED/comments/jyly1e/challenge_fastled_sketch_that_fits_entirely_in_a/
  9. //https://twitter.com/skullctf/status/1329474477185445890
  10.  
  11. //look how it look in online emulator:
  12. //https://wokwi.com/arduino/projects/284507222037234184
  13.  
  14. #import<FastLED.h>
  15. CRGB l[256],c;int x,m,i,j;void setup(){LEDS.addLeds<WS2812,3,GRB>(l,256);}void loop(){m=millis()/9;nscale8(l,256,99);i=-1;while(i++<16){x=(sin8(i*8+m*2)+cos8(i*19+m*3))/32;j=0;while(j++<16)l[i*16+lerp8by8(x,15-x,j*15)].setHue(i*8+m)%=(j*255/16);}LEDS.show();}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement