Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. void mardisGrasAnimation() {
  2. int j;
  3. static uint16_t count = 0;
  4. for(j=0; j < LIGHTS; j++) {
  5.  
  6. if(j%count == 0) {
  7. led_strip[j].green =255;
  8. led_strip[j].red = 0;
  9. led_strip[j].blue = 0;
  10. }
  11.  
  12. if(j%count == 1) {
  13.  
  14. led_strip[j].green =69;
  15. led_strip[j].red = 139;
  16. led_strip[j].blue = 19;
  17. }
  18.  
  19. if(j%count == 2) {
  20. led_strip[j].green =0;
  21. led_strip[j].red = 255;
  22. led_strip[j].blue = 255;
  23. }
  24.  
  25. if(j%count == 3) {
  26. led_strip[j].green =100;
  27. led_strip[j].red = 100;
  28. led_strip[j].blue = 0;
  29. }
  30.  
  31. if(j%count == 4) {
  32. led_strip[j].green =215;
  33. led_strip[j].red = 255;
  34. led_strip[j].blue = 0;
  35. }
  36. }
  37.  
  38.  
  39. /* Call to set the colors */
  40. int i;
  41. for(i = 0; i < LIGHTS; i++) {
  42. //icicleAnimation();
  43. setColor(led_strip[i].green, led_strip[i].red, led_strip[i].blue);
  44. //move to next light in strip
  45. }
  46. count++;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement