| 95 | fl::XYMap xyMap(WIDTH, HEIGHT, SERPENTINE); |
| 96 | |
| 97 | void setup() { |
| 98 | Serial.begin(115200); // Initialize serial communication for debugging |
| 99 | |
| 100 | // Initialize the LED strip: |
| 101 | // - NEOPIXEL is the LED type |
| 102 | // - 3 is the data pin number (for real hardware) |
| 103 | // - setScreenMap connects our 2D coordinate system to the 1D LED array |
| 104 | fl::ScreenMap screen_map = xyMap.toScreenMap(); |
| 105 | screen_map.setDiameter(0.1f); // Set the diameter for the cylinder (0.2 cm per LED) |
| 106 | FastLED.addLeds<NEOPIXEL, 3>(leds, HEIGHT * WIDTH).setScreenMap(screen_map); |
| 107 | |
| 108 | // Apply color correction for more accurate colors on LED strips |
| 109 | FastLED.setCorrection(TypicalLEDStrip); |
| 110 | } |
| 111 | |
| 112 | uint8_t getPaletteIndex(uint32_t millis32, int width, int max_width, int height, int max_height, |
| 113 | uint32_t y_speed) { |
nothing calls this directly
no test coverage detected