| 107 | |
| 108 | |
| 109 | void loop() { |
| 110 | static uint8_t circlex = 0; // okay static in header |
| 111 | static uint8_t circley = 0; // okay static in header |
| 112 | |
| 113 | static uint8_t ihue=0; // okay static in header |
| 114 | fillnoise8(); |
| 115 | for(int i = 0; i < kMatrixWidth; i++) { |
| 116 | for(int j = 0; j < kMatrixHeight; j++) { |
| 117 | // We use the value at the (i,j) coordinate in the noise |
| 118 | // array for our brightness, and the flipped value from (j,i) |
| 119 | // for our pixel's hue. |
| 120 | leds[XY(i,j)] = CHSV(noise[j][i],255,noise[i][j]); |
| 121 | |
| 122 | // You can also explore other ways to constrain the hue used, like below |
| 123 | // leds[XY(i,j)] = CHSV(ihue + (noise[j][i]>>2),255,noise[i][j]); |
| 124 | } |
| 125 | } |
| 126 | ihue+=1; |
| 127 | |
| 128 | // N.B. this requires SmartMatrix modified w/triple buffering support |
| 129 | pSmartMatrix->fillCircle(circlex % 32,circley % 32,6,CRGB(CHSV(ihue+128,255,255))); |
| 130 | circlex += random16(2); |
| 131 | circley += random16(2); |
| 132 | FastLED.show(); |
| 133 | // delay(10); |
| 134 | } |
nothing calls this directly
no test coverage detected