Advertisement
ldirko

Rotozoomer 264 byte

Nov 25th, 2020 (edited)
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Rotozoomer 264 byte
  2. //Fastled 16x16 rgb led matrix demo
  3. //Yaroslaw Turbin, 25.11.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/283190606061109768
  13.  
  14. #include <FastLED.h>
  15. CRGB d[256];byte i,l[256];float a;void setup(){LEDS.addLeds<WS2812,3,GRB>(d,256);}void loop(){l[i]=sin8(i%16*16)/2+sin8(i)/2;d[i]=CHSV(l[abs8(i%16*sin(a)+i/16*cos(a))%16*16+abs8(i%16*cos(a)-i/16*sin(a))%16],~0,~0);if(!++i){LEDS.show();a-=.1;}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement