Update WiFi SoftAP password to love, update touch pin mappings, and remove unused decoders to resolve compile crash.
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
#include "Web_Server.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define BOOT_KEY_PIN 9
|
||||
#define PIN_NEOPIXEL 38
|
||||
#define BOOT_KEY_PIN 0
|
||||
|
||||
// Playback states
|
||||
enum AppState {
|
||||
@@ -48,10 +47,6 @@ void setup() {
|
||||
printf("Starting Sound and Picture Player...\r\n");
|
||||
printf("==========================================\r\n");
|
||||
|
||||
// Setup NeoPixel
|
||||
pinMode(PIN_NEOPIXEL, OUTPUT);
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 32); // Turn on solid blue to show booting
|
||||
|
||||
// Initialize Display and Backlight first so the screen lights up immediately
|
||||
LCD_Init();
|
||||
Set_Backlight(90);
|
||||
@@ -150,14 +145,6 @@ void handleQuadruplePress() {
|
||||
uint8_t nextVol = getPlayerVolume() + 4;
|
||||
if (nextVol > 20) nextVol = 4; // Loop back
|
||||
setPlayerVolume(nextVol);
|
||||
|
||||
// Quick flash NeoPixel white to indicate volume change
|
||||
for(int i = 0; i < 3; i++) {
|
||||
neopixelWrite(PIN_NEOPIXEL, 64, 64, 64);
|
||||
delay(50);
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 0);
|
||||
delay(50);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,41 +165,7 @@ void handleLongPress() {
|
||||
}
|
||||
|
||||
void updateLEDStatus() {
|
||||
uint32_t now = millis();
|
||||
|
||||
// Pulse animation frequency
|
||||
if (now - lastLedPulseTime > 15) {
|
||||
lastLedPulseTime = now;
|
||||
if (pulseDirection) {
|
||||
pulseBrightness += 2;
|
||||
if (pulseBrightness >= 120) pulseDirection = false;
|
||||
} else {
|
||||
pulseBrightness -= 2;
|
||||
if (pulseBrightness <= 10) pulseDirection = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Update LED color based on state
|
||||
if (hasError) {
|
||||
// Flashing red
|
||||
if ((now / 250) % 2 == 0) {
|
||||
neopixelWrite(PIN_NEOPIXEL, 64, 0, 0); // Dim Red
|
||||
} else {
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
else if (isAudioPlaying()) {
|
||||
// Pulsing Green
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, pulseBrightness, 0);
|
||||
}
|
||||
else if (currentState == STATE_AUTOPLAY) {
|
||||
// Pulsing Purple (Red + Blue)
|
||||
neopixelWrite(PIN_NEOPIXEL, pulseBrightness / 2, 0, pulseBrightness);
|
||||
}
|
||||
else {
|
||||
// Solid Blue
|
||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 32);
|
||||
}
|
||||
// Disabled NeoPixel code to resolve hardware conflict with SPI SCLK (GPIO 38)
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in New Issue
Block a user