FTP-Server for managing the contents of the sd card.

This commit is contained in:
Fabian Schlenz 2022-08-25 14:48:25 +02:00
parent 13e62fea19
commit 076a6993c7
2 changed files with 7 additions and 2 deletions

View File

@ -24,10 +24,11 @@ lib_deps =
${extra.lib_deps} ${extra.lib_deps}
esphome/ESP32-audioI2S@^2.1.0 esphome/ESP32-audioI2S@^2.1.0
computer991/Arduino_MFRC522v2@^2.0.1 computer991/Arduino_MFRC522v2@^2.0.1
https://github.com/dplasa/FTPClientServer
;upload_port = 10.10.2.108 ;upload_port = 10.10.2.108
monitor_speed = 115200 monitor_speed = 115200
monitor_port = /dev/cu.usbserial-0001 monitor_port = /dev/cu.usbserial-0001
monitor_filters = time, esp32_exception_decoder monitor_filters = esp32_exception_decoder
[env:deploy] [env:deploy]
platform = espressif32 platform = espressif32

View File

@ -13,11 +13,13 @@
#include <MFRC522Debug.h> #include <MFRC522Debug.h>
#include <Arduino.h> #include <Arduino.h>
#include <Wire.h> #include <Wire.h>
#include <FTPServer.h>
Controller controller; Controller controller;
Audio audio; Audio audio;
PlaylistManager* pm; PlaylistManager* pm;
MFRC522* rfid; MFRC522* rfid;
FTPServer ftp(SD);
void setup() { void setup() {
pinMode(PIN_CS_SD, OUTPUT); digitalWrite(PIN_CS_SD, HIGH); pinMode(PIN_CS_SD, OUTPUT); digitalWrite(PIN_CS_SD, HIGH);
@ -92,13 +94,15 @@ void setup() {
Serial.println("Setup finished."); Serial.println("Setup finished.");
audio.setVolume(12); audio.setVolume(12);
audio.connecttospeech("Die Papabox ist nun einsatzbereit!", "de_DE");
ftp.begin("", "");
} }
void loop() { void loop() {
ArduinoOTA.handle(); ArduinoOTA.handle();
controller.handle(); controller.handle();
audio.loop(); audio.loop();
ftp.handleFTP();
} }
void audio_info(const char *info){ void audio_info(const char *info){