This commit is contained in:
Stefan Ostermann 2023-09-22 12:37:16 +02:00
parent cbbc9154db
commit 75e6413693
2 changed files with 17 additions and 11 deletions

View File

@ -107,6 +107,14 @@ Previous -> 16 and GND
![](images/wemos-d1-mini-esp32.png)
## Schematic without modules
### Charging circuit
https://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf
MCP73837 ?
## Links
https://github.com/earlephilhower/ESP8266Audio

View File

@ -62,6 +62,8 @@ bool asyncStop = false;
bool asyncStart = false;
bool asyncTogglePlayPause = false;
std::map<String, String> rfid_map{{"67 152 204 14", "01-The_Box_Tops-The_Letter.mp3"},
{"67 175 148 160","068-Der_Schatz_im_Bergsee"}};
@ -429,6 +431,11 @@ void loop()
} else if (asyncStart) {
asyncStart = false;
start();
}
if (asyncTogglePlayPause) {
asyncTogglePlayPause = false;
togglePlayPause();
}
rfid_loop--;
@ -448,20 +455,12 @@ void loop()
void loop2(void *parameter)
{
Serial.println("loop2 started");
for (;;)
{
if (buttonPressed(BTN_START_STOP))
{
if (audio.isRunning())
{
asyncStop = true;
asyncStart = false;
}
else
{
asyncStart = true;
asyncStop = false;
}
asyncTogglePlayPause = true;
}
}
}
@ -473,7 +472,6 @@ boolean buttonPressed(const uint8_t pin)
unsigned long now = millis();
if (now - lastStart > startDelay)
{
lastStart = now;
return true;
}