| 140 | } |
| 141 | |
| 142 | fl::CRGBPalette16 getPalette() { |
| 143 | // This function returns the appropriate color palette based on the UI selection |
| 144 | switch (palette) { |
| 145 | case 0: |
| 146 | return firepal; // Traditional orange/red fire |
| 147 | case 1: |
| 148 | return electricGreenFirePal; // Green "toxic" fire |
| 149 | case 2: |
| 150 | return electricBlueFirePal; // Blue "cold" fire |
| 151 | default: |
| 152 | return firepal; // Default to traditional fire if invalid value |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | void loop() { |
| 157 | // The main program loop that runs continuously |