Added initial Melody Playback Ability
Now, controlled via MQTT a Playback of a melody can Start, Stop, Pause etc. Settings like speed, total duration, pauses etc can be set.
This commit is contained in:
17
.vscode/arduino.json
vendored
Normal file
17
.vscode/arduino.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"port": "COM8",
|
||||||
|
"configuration": "UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default",
|
||||||
|
"output": "build",
|
||||||
|
"board": "esp32:esp32:esp32",
|
||||||
|
"programmer": "",
|
||||||
|
"useProgrammer": false,
|
||||||
|
"configurationRequired": true,
|
||||||
|
"monitorPortSettings": {
|
||||||
|
"port": "COM8",
|
||||||
|
"baudRate": 115200,
|
||||||
|
"lineEnding": "\r\n",
|
||||||
|
"dataBits": 8,
|
||||||
|
"parity": "none",
|
||||||
|
"stopBits": "one"
|
||||||
|
}
|
||||||
|
}
|
||||||
16
.vscode/c_cpp_properties.json
vendored
Normal file
16
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Win32",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"_DEBUG",
|
||||||
|
"UNICODE",
|
||||||
|
"_UNICODE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
64
MQTT.hpp
64
MQTT.hpp
@@ -1,64 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
const IPAddress MQTT_HOST(10,98,20,10);
|
|
||||||
const int MQTT_PORT = 1883;
|
|
||||||
|
|
||||||
AsyncMqttClient mqttClient;
|
|
||||||
|
|
||||||
String GetPayloadContent(char* data, size_t len) {
|
|
||||||
String content = "";
|
|
||||||
for(size_t i = 0; i < len; i++)
|
|
||||||
{
|
|
||||||
content.concat(data[i]);
|
|
||||||
}
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SuscribeMqtt() {
|
|
||||||
|
|
||||||
String topicPlayback = String("vesper/") + DEV_ID + "/control/playback";
|
|
||||||
String topicAddMelody = String("vesper/") + DEV_ID + "/control/add_melody";
|
|
||||||
|
|
||||||
uint16_t control_id = mqttClient.subscribe(topicPlayback.c_str(), 2);
|
|
||||||
Serial.print("Subscribing to playback topic, QoS 2, packetId: ");
|
|
||||||
Serial.println(control_id);
|
|
||||||
|
|
||||||
// doesn't work yet:
|
|
||||||
uint16_t add_melody_id = mqttClient.subscribe(topicAddMelody.c_str(), 2);
|
|
||||||
Serial.print("Subscribing to add_melody topic, QoS 2, packetId: ");
|
|
||||||
Serial.println(add_melody_id);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void PublishMqtt(unsigned long data) {
|
|
||||||
|
|
||||||
String topicData = String("vesper/") + DEV_ID + "/data";
|
|
||||||
|
|
||||||
String payload = String(data);
|
|
||||||
mqttClient.publish(topicData.c_str(), 0, true, (char*)payload.c_str());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnMqttReceived(char* topic, char* payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total)
|
|
||||||
{
|
|
||||||
|
|
||||||
String topicPlayback = String("vesper/") + DEV_ID + "/control/playback";
|
|
||||||
String topicAddMelody = String("vesper/") + DEV_ID + "/control/add_melody"; // doesn't work yet.
|
|
||||||
|
|
||||||
String payloadContent = String(payload).substring(0, len);
|
|
||||||
|
|
||||||
if (String(topic) == topicPlayback) {
|
|
||||||
// Handle the playback command
|
|
||||||
handleJSON(payload);
|
|
||||||
}
|
|
||||||
else if (String(topic) == topicAddMelody) {
|
|
||||||
// Handle adding melody
|
|
||||||
Serial.println("Adding melody...");
|
|
||||||
// You can call a function here to handle adding the melody
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Handle unknown topics
|
|
||||||
Serial.println("Unknown topic received.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
81
MQTT_Message_Handling.hpp
Normal file
81
MQTT_Message_Handling.hpp
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
void handlePlaybackCommands(char * command);
|
||||||
|
|
||||||
|
void handleJSON(char * payload) {
|
||||||
|
JsonDocument doc;
|
||||||
|
DeserializationError error = deserializeJson(doc, payload);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
Serial.print("deserializeJson() failed: ");
|
||||||
|
Serial.println(error.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setMelodyAttributes(doc);
|
||||||
|
loadMelodyInRAM(melody_steps);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SuscribeMqtt() {
|
||||||
|
|
||||||
|
String topicPlayback = String("vesper/") + DEV_ID + "/control/playback";
|
||||||
|
String topicSetMelody = String("vesper/") + DEV_ID + "/control/setMelody";
|
||||||
|
String topicAddMelody = String("vesper/") + DEV_ID + "/control/add_melody";
|
||||||
|
|
||||||
|
uint16_t control_id = mqttClient.subscribe(topicPlayback.c_str(), 2);
|
||||||
|
Serial.print("Subscribing to Playback Control topic, QoS 2, packetId: ");
|
||||||
|
Serial.println(control_id);
|
||||||
|
|
||||||
|
uint16_t set_melody_id = mqttClient.subscribe(topicSetMelody.c_str(), 2);
|
||||||
|
Serial.print("Subscribing to Set-Melody topic, QoS 2, packetId: ");
|
||||||
|
Serial.println(set_melody_id);
|
||||||
|
|
||||||
|
// doesn't work yet:
|
||||||
|
uint16_t add_melody_id = mqttClient.subscribe(topicAddMelody.c_str(), 2);
|
||||||
|
Serial.print("Subscribing to Add-Melody topic, QoS 2, packetId: ");
|
||||||
|
Serial.println(add_melody_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttReceived(char * topic, char * payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total) {
|
||||||
|
|
||||||
|
String topicPlayback = String("vesper/") + DEV_ID + "/control/playback";
|
||||||
|
String topicSetMelody = String("vesper/") + DEV_ID + "/control/setMelody";
|
||||||
|
String topicAddMelody = String("vesper/") + DEV_ID + "/control/add_melody";
|
||||||
|
|
||||||
|
|
||||||
|
//String payloadContent = String(payload).substring(0, len);
|
||||||
|
|
||||||
|
if (String(topic) == topicPlayback){
|
||||||
|
handlePlaybackCommands(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (String(topic) == topicSetMelody) {
|
||||||
|
handleJSON(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (String(topic) == topicAddMelody) {
|
||||||
|
// Handle adding melody
|
||||||
|
Serial.println("Adding melody...");
|
||||||
|
// You can call a function here to handle adding the melody
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Handle unknown topics
|
||||||
|
Serial.println("Unknown topic received.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// void PublishMqtt(unsigned long data) {
|
||||||
|
//
|
||||||
|
// //Doesn't publish anything yet.
|
||||||
|
// String topicData = String("vesper/") + DEV_ID + "/data";
|
||||||
|
// String payload = String(data);
|
||||||
|
// mqttClient.publish(topicData.c_str(), 0, true, (char*)payload.c_str());
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
void PublishMqtt(const char *data) {
|
||||||
|
String topicData = String("vesper/") + DEV_ID + "/data";
|
||||||
|
mqttClient.publish(topicData.c_str(), 0, true, data);
|
||||||
|
}
|
||||||
138
MQTT_WiFi_Utilities.hpp
Normal file
138
MQTT_WiFi_Utilities.hpp
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
TimerHandle_t mqttReconnectTimer;
|
||||||
|
TimerHandle_t wifiReconnectTimer;
|
||||||
|
|
||||||
|
String GetPayloadContent(char * data, size_t len) {
|
||||||
|
String content = "";
|
||||||
|
for(size_t i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
content.concat(data[i]);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectToMqtt()
|
||||||
|
{
|
||||||
|
Serial.println("Connecting to MQTT...");
|
||||||
|
mqttClient.connect();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttConnect(bool sessionPresent)
|
||||||
|
{
|
||||||
|
Serial.println("Connected to MQTT.");
|
||||||
|
Serial.print("Session present: ");
|
||||||
|
Serial.println(sessionPresent);
|
||||||
|
SuscribeMqtt();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttDisconnect(AsyncMqttClientDisconnectReason reason)
|
||||||
|
{
|
||||||
|
Serial.println("Disconnected from MQTT.");
|
||||||
|
|
||||||
|
if(WiFi.isConnected())
|
||||||
|
{
|
||||||
|
xTimerStart(mqttReconnectTimer, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttSubscribe(uint16_t packetId, uint8_t qos)
|
||||||
|
{
|
||||||
|
Serial.println("Subscribe acknowledged.");
|
||||||
|
Serial.print(" packetId: ");
|
||||||
|
Serial.println(packetId);
|
||||||
|
Serial.print(" qos: ");
|
||||||
|
Serial.println(qos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttUnsubscribe(uint16_t packetId)
|
||||||
|
{
|
||||||
|
Serial.println("Unsubscribe acknowledged.");
|
||||||
|
Serial.print(" packetId: ");
|
||||||
|
Serial.println(packetId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttPublish(uint16_t packetId)
|
||||||
|
{
|
||||||
|
Serial.println("Publish acknowledged.");
|
||||||
|
Serial.print(" packetId: ");
|
||||||
|
Serial.println(packetId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectWiFi_STA(bool useStaticIP = false)
|
||||||
|
{
|
||||||
|
Serial.println("");
|
||||||
|
WiFi.mode(WIFI_STA);
|
||||||
|
if(useStaticIP) {
|
||||||
|
WiFi.config(ip, gateway, subnet);
|
||||||
|
WiFi.setHostname(hostname);
|
||||||
|
}
|
||||||
|
WiFi.begin(ssid, password);
|
||||||
|
|
||||||
|
while (WiFi.status() != WL_CONNECTED) {
|
||||||
|
delay(100);
|
||||||
|
Serial.print('.');
|
||||||
|
}
|
||||||
|
|
||||||
|
Serial.println("");
|
||||||
|
Serial.print("Iniciado STA:\t");
|
||||||
|
Serial.println(ssid);
|
||||||
|
Serial.print("IP address:\t");
|
||||||
|
Serial.println(WiFi.localIP());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectWiFi_AP(bool useStaticIP = false)
|
||||||
|
{
|
||||||
|
Serial.println("");
|
||||||
|
WiFi.mode(WIFI_AP);
|
||||||
|
while(!WiFi.softAP(ssid, password))
|
||||||
|
{
|
||||||
|
Serial.println(".");
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(useStaticIP) WiFi.softAPConfig(ip, gateway, subnet);
|
||||||
|
|
||||||
|
Serial.println("");
|
||||||
|
Serial.print("Iniciado AP:\t");
|
||||||
|
Serial.println(ssid);
|
||||||
|
Serial.print("IP address:\t");
|
||||||
|
Serial.println(WiFi.softAPIP());
|
||||||
|
}
|
||||||
|
|
||||||
|
void WiFiEvent(WiFiEvent_t event)
|
||||||
|
{
|
||||||
|
Serial.printf("[WiFi-event] event: %d\n", event);
|
||||||
|
switch(event)
|
||||||
|
{
|
||||||
|
case ARDUINO_EVENT_WIFI_STA_GOT_IP:
|
||||||
|
Serial.println("WiFi connected");
|
||||||
|
Serial.println("IP address: ");
|
||||||
|
Serial.println(WiFi.localIP());
|
||||||
|
ConnectToMqtt();
|
||||||
|
break;
|
||||||
|
case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
|
||||||
|
Serial.println("WiFi lost connection");
|
||||||
|
xTimerStop(mqttReconnectTimer, 0); // ensure we don't reconnect to MQTT while reconnecting to Wi-Fi
|
||||||
|
xTimerStart(wifiReconnectTimer, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitMqtt()
|
||||||
|
{
|
||||||
|
mqttReconnectTimer = xTimerCreate("mqttTimer", pdMS_TO_TICKS(2000), pdFALSE, (void*)0, reinterpret_cast<TimerCallbackFunction_t>(ConnectToMqtt));
|
||||||
|
wifiReconnectTimer = xTimerCreate("wifiTimer", pdMS_TO_TICKS(5000), pdFALSE, (void*)0, reinterpret_cast<TimerCallbackFunction_t>(ConnectWiFi_STA));
|
||||||
|
|
||||||
|
mqttClient.onConnect(OnMqttConnect);
|
||||||
|
mqttClient.onDisconnect(OnMqttDisconnect);
|
||||||
|
|
||||||
|
mqttClient.onSubscribe(OnMqttSubscribe);
|
||||||
|
mqttClient.onUnsubscribe(OnMqttUnsubscribe);
|
||||||
|
|
||||||
|
mqttClient.onMessage(OnMqttReceived);
|
||||||
|
mqttClient.onPublish(OnMqttPublish);
|
||||||
|
|
||||||
|
mqttClient.setServer(MQTT_HOST, MQTT_PORT);
|
||||||
|
mqttClient.setCredentials(MQTT_USER, MQTT_PASS);
|
||||||
|
}
|
||||||
84
PlaybackControls.hpp
Normal file
84
PlaybackControls.hpp
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
extern melody_attributes melody;
|
||||||
|
|
||||||
|
bool timeToStop(unsigned long now);
|
||||||
|
bool timeToPause(unsigned long now);
|
||||||
|
bool timeToResume(unsigned long now);
|
||||||
|
void durationTimer(void *param);
|
||||||
|
|
||||||
|
// Timer task to control playback state
|
||||||
|
void durationTimer(void *param) {
|
||||||
|
|
||||||
|
// Task Setup
|
||||||
|
|
||||||
|
|
||||||
|
// Task Loop
|
||||||
|
while (true) {
|
||||||
|
|
||||||
|
unsigned long now = millis();
|
||||||
|
|
||||||
|
if (timeToStop(now)) {
|
||||||
|
melody.stop();
|
||||||
|
} else if (timeToPause(now)) {
|
||||||
|
melody.pause();
|
||||||
|
} else if (timeToResume(now)) {
|
||||||
|
melody.unpause();
|
||||||
|
}
|
||||||
|
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(1000)); // Check every 100ms
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if it's time to stop playback
|
||||||
|
bool timeToStop(unsigned long now) {
|
||||||
|
if (melody.isPlaying) {
|
||||||
|
uint64_t stopTime = melody.startTime + melody.duration;
|
||||||
|
if (now >= stopTime) {
|
||||||
|
Serial.println("TIMER: Total Duration Reached");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if it's time to pause playback
|
||||||
|
bool timeToPause(unsigned long now) {
|
||||||
|
if (melody.isPlaying && melody.loop_duration > 0) {
|
||||||
|
uint64_t pauseTimeLimit = melody.loopStartTime + melody.loop_duration;
|
||||||
|
Serial.printf("PTL: %lu // NOW: ",pauseTimeLimit);
|
||||||
|
Serial.println(now);
|
||||||
|
if (now >= pauseTimeLimit && !melody.isPaused) {
|
||||||
|
Serial.println("TIMER: Segment Duration Reached");
|
||||||
|
melody.pauseTime = now;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if it's time to resume playback
|
||||||
|
bool timeToResume(unsigned long now) {
|
||||||
|
if (melody.isPaused) {
|
||||||
|
uint64_t resumeTime = melody.pauseTime + melody.interval;
|
||||||
|
if (now >= resumeTime) {
|
||||||
|
Serial.println("TIMER: Pause Duration Reached");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void handlePlaybackCommands(char * command){
|
||||||
|
Serial.print("INCOMING COMMAND: ");
|
||||||
|
Serial.println(command);
|
||||||
|
if (command[0] == '1') {
|
||||||
|
melody.play();
|
||||||
|
PublishMqtt("OK - PLAY");
|
||||||
|
} else if (command[0] == '0') {
|
||||||
|
melody.forceStop();
|
||||||
|
PublishMqtt("OK - STOP");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
68
bellEngine.hpp
Normal file
68
bellEngine.hpp
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
// MELODY PLAYBACK WILL BE HANDLED HERE
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
extern melody_attributes melody;
|
||||||
|
extern uint16_t relayMask;
|
||||||
|
|
||||||
|
void loop_playback(std::vector<uint16_t> &melody_steps);
|
||||||
|
void itsHammerTime(uint16_t note);
|
||||||
|
|
||||||
|
|
||||||
|
void bellEngine(void *parameter) {
|
||||||
|
|
||||||
|
// SETUP TASK
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
|
||||||
|
// Playback until stopped (Completes AT LEAST 1 full loop)
|
||||||
|
loop_playback(melody_steps);
|
||||||
|
|
||||||
|
/*
|
||||||
|
UBaseType_t highWaterMark = uxTaskGetStackHighWaterMark(NULL);
|
||||||
|
Serial.print("Stack high water mark: ");
|
||||||
|
Serial.println(highWaterMark);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void loop_playback(std::vector<uint16_t> &melody_steps) {
|
||||||
|
|
||||||
|
while(melody.isPlaying && !melody.isPaused){
|
||||||
|
|
||||||
|
// iterate through the beats and call the bell mechanism on each beat
|
||||||
|
for (uint16_t note : melody_steps) {
|
||||||
|
if (melody.hardStop) return;
|
||||||
|
itsHammerTime(note);
|
||||||
|
int tempo = melody.speed;
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(tempo));
|
||||||
|
}
|
||||||
|
|
||||||
|
Serial.println("SINGLE LOOP OVER.");
|
||||||
|
//if (!melody.isPlaying) break; // Stop playback only after completing the loop
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void itsHammerTime(uint16_t note){
|
||||||
|
|
||||||
|
// THIS NEEDS REWORK, TO WAIT, DYNAMICLY PER RELAY
|
||||||
|
// MUST BE CONFIGURABLE REMOTELY
|
||||||
|
|
||||||
|
for (uint8_t i=0; i<16; i++) {
|
||||||
|
if (note & (1 << i)) {
|
||||||
|
relays.digitalWrite(i, LOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(relayDurations[0]));
|
||||||
|
|
||||||
|
for (uint8_t i=0; i<16; i++) {
|
||||||
|
relays.digitalWrite(i, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
9
build/build.options.json
Normal file
9
build/build.options.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"additionalFiles": "..\\..\\..,..\\..,..\\..,..\\..,..\\..,..\\..,..\\..,..\\..,..\\..",
|
||||||
|
"compiler.optimization_flags": "-Os",
|
||||||
|
"customBuildProperties": "build.warn_data_percentage=75",
|
||||||
|
"fqbn": "esp32:esp32:esp32:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default",
|
||||||
|
"hardwareFolders": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages",
|
||||||
|
"otherLibrariesFolders": "C:\\Users\\espi_\\Documents\\Arduino\\libraries",
|
||||||
|
"sketchLocation": "C:\\Users\\espi_\\Documents\\Arduino\\vesper"
|
||||||
|
}
|
||||||
0
build/build_opt.h
Normal file
0
build/build_opt.h
Normal file
3
build/compile_result.json
Normal file
3
build/compile_result.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"result": false
|
||||||
|
}
|
||||||
0
build/file_opts
Normal file
0
build/file_opts
Normal file
287
build/includes.cache
Normal file
287
build/includes.cache
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"Sourcefile": null,
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\cores\\esp32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": null,
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\variants\\esp32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "WiFi.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "Network.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "AsyncMqttClient.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "AsyncTCP.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Async_TCP\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "ArduinoJson.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\ArduinoJson\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "FS.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\FS\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "SPIFFS.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\SPIFFS\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "Wire.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Wire\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "Adafruit_PCF8574.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_PCF8574"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "Adafruit_BusIO_Register.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_BusIO"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "SPI.h",
|
||||||
|
"Includepath": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\SPI\\src"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "c:\\Users\\espi_\\Documents\\Arduino\\vesper\\build\\sketch\\vesper.ino.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\AP.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\STA.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\WiFi.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\WiFiAP.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\WiFiGeneric.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\WiFiMulti.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\WiFiSTA.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src\\WiFiScan.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src\\NetworkClient.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src\\NetworkEvents.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src\\NetworkInterface.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src\\NetworkManager.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src\\NetworkServer.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src\\NetworkUdp.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\ConnAckPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\Connect.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\Disconn.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\OutPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\PingReq.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\PubAck.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\Publish.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\Subscribe.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\Out\\Unsubscribe.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\PingRespPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\PubAckPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\PubCompPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\PubRecPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\PubRelPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\PublishPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\SubAckPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient\\Packets\\UnsubAckPacket.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src\\AsyncMqttClient.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Async_TCP\\src\\AsyncTCP.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\FS\\src\\FS.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\FS\\src\\vfs_api.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\SPIFFS\\src\\SPIFFS.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Wire\\src\\Wire.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_PCF8574\\Adafruit_PCF8574.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_PCF8574\\Adafruit_PCF8575.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_BusIO\\Adafruit_BusIO_Register.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_BusIO\\Adafruit_I2CDevice.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_BusIO\\Adafruit_SPIDevice.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sourcefile": "C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\SPI\\src\\SPI.cpp",
|
||||||
|
"Include": "",
|
||||||
|
"Includepath": null
|
||||||
|
}
|
||||||
|
]
|
||||||
1
build/libraries.cache
Normal file
1
build/libraries.cache
Normal file
@@ -0,0 +1 @@
|
|||||||
|
["C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\cores\\esp32","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\variants\\esp32","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\WiFi\\src","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Network\\src","C:\\Users\\espi_\\Documents\\Arduino\\libraries\\AsyncMqttClient\\src","C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Async_TCP\\src","C:\\Users\\espi_\\Documents\\Arduino\\libraries\\ArduinoJson\\src","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\FS\\src","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\SPIFFS\\src","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\Wire\\src","C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_PCF8574","C:\\Users\\espi_\\Documents\\Arduino\\libraries\\Adafruit_BusIO","C:\\Users\\espi_\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.0.7\\libraries\\SPI\\src"]
|
||||||
7
build/partitions.csv
Normal file
7
build/partitions.csv
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
|
nvs, data, nvs, 0x9000, 0x5000,
|
||||||
|
otadata, data, ota, 0xe000, 0x2000,
|
||||||
|
app0, app, ota_0, 0x10000, 0x140000,
|
||||||
|
app1, app, ota_1, 0x150000,0x140000,
|
||||||
|
spiffs, data, spiffs, 0x290000,0x160000,
|
||||||
|
coredump, data, coredump,0x3F0000,0x10000,
|
||||||
|
2734
build/sdkconfig
Normal file
2734
build/sdkconfig
Normal file
File diff suppressed because it is too large
Load Diff
18
build/sketch/.vscode/arduino.json
vendored
Normal file
18
build/sketch/.vscode/arduino.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\.vscode\\arduino.json"
|
||||||
|
{
|
||||||
|
"port": "COM8",
|
||||||
|
"configuration": "UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,PSRAM=disabled,LoopCore=1,EventsCore=1,EraseFlash=none,JTAGAdapter=default,ZigbeeMode=default",
|
||||||
|
"output": "build",
|
||||||
|
"board": "esp32:esp32:esp32",
|
||||||
|
"programmer": "",
|
||||||
|
"useProgrammer": false,
|
||||||
|
"configurationRequired": true,
|
||||||
|
"monitorPortSettings": {
|
||||||
|
"port": "COM8",
|
||||||
|
"baudRate": 115200,
|
||||||
|
"lineEnding": "\r\n",
|
||||||
|
"dataBits": 8,
|
||||||
|
"parity": "none",
|
||||||
|
"stopBits": "one"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\ESP32_Utils.hpp"
|
||||||
void ConnectWiFi_STA(bool useStaticIP = false)
|
void ConnectWiFi_STA(bool useStaticIP = false)
|
||||||
{
|
{
|
||||||
Serial.println("");
|
Serial.println("");
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\ESP32_Utils_MQTT_Async.hpp"
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
TimerHandle_t mqttReconnectTimer;
|
TimerHandle_t mqttReconnectTimer;
|
||||||
@@ -62,7 +63,6 @@ void OnMqttUnsubscribe(uint16_t packetId)
|
|||||||
Serial.println(packetId);
|
Serial.println(packetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OnMqttPublish(uint16_t packetId)
|
void OnMqttPublish(uint16_t packetId)
|
||||||
{
|
{
|
||||||
Serial.println("Publish acknowledged.");
|
Serial.println("Publish acknowledged.");
|
||||||
89
build/sketch/MQTT.hpp
Normal file
89
build/sketch/MQTT.hpp
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\MQTT.hpp"
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
const IPAddress MQTT_HOST(10,98,20,10);
|
||||||
|
const int MQTT_PORT = 1883;
|
||||||
|
|
||||||
|
AsyncMqttClient mqttClient;
|
||||||
|
|
||||||
|
extern bool forceStop;
|
||||||
|
extern volatile bool playing;
|
||||||
|
|
||||||
|
String GetPayloadContent(char * data, size_t len) {
|
||||||
|
String content = "";
|
||||||
|
for(size_t i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
content.concat(data[i]);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SuscribeMqtt() {
|
||||||
|
|
||||||
|
String topicPlayback = String("vesper/") + DEV_ID + "/control/playback";
|
||||||
|
String topicSetMelody = String("vesper/") + DEV_ID + "/control/setMelody";
|
||||||
|
String topicAddMelody = String("vesper/") + DEV_ID + "/control/add_melody";
|
||||||
|
|
||||||
|
uint16_t control_id = mqttClient.subscribe(topicPlayback.c_str(), 2);
|
||||||
|
Serial.print("Subscribing to Playback Control topic, QoS 2, packetId: ");
|
||||||
|
Serial.println(control_id);
|
||||||
|
|
||||||
|
uint16_t set_melody_id = mqttClient.subscribe(topic_eBrake.c_str(), 2);
|
||||||
|
Serial.print("Subscribing to Set-Melody topic, QoS 2, packetId: ");
|
||||||
|
Serial.println(set_melody_id);
|
||||||
|
|
||||||
|
// doesn't work yet:
|
||||||
|
uint16_t add_melody_id = mqttClient.subscribe(topicAddMelody.c_str(), 2);
|
||||||
|
Serial.print("Subscribing to Add-Melody topic, QoS 2, packetId: ");
|
||||||
|
Serial.println(add_melody_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PublishMqtt(unsigned long data) {
|
||||||
|
|
||||||
|
//Doesn't publish anything yet.
|
||||||
|
String topicData = String("vesper/") + DEV_ID + "/data";
|
||||||
|
String payload = String(data);
|
||||||
|
mqttClient.publish(topicData.c_str(), 0, true, (char*)payload.c_str());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMqttReceived(char * topic, char * payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total)
|
||||||
|
{
|
||||||
|
|
||||||
|
String topicPlayback = String("vesper/") + DEV_ID + "/control/playback";
|
||||||
|
String topicSetMelody = String("vesper/") + DEV_ID + "/control/setMelody";
|
||||||
|
String topicAddMelody = String("vesper/") + DEV_ID + "/control/add_melody";
|
||||||
|
|
||||||
|
|
||||||
|
String payloadContent = String(payload).substring(0, len);
|
||||||
|
|
||||||
|
if (String(topic) == topicPlayback){
|
||||||
|
if (len == 1 && payload[0] == '0') { // Checking for raw '0' byte
|
||||||
|
forceStop = true;
|
||||||
|
Serial.println("STOPPING Playback!");
|
||||||
|
}
|
||||||
|
else if (len == 1 && payload[0] == '1'){
|
||||||
|
playing = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (String(topic) == topicSetMelody) {
|
||||||
|
// Handle the playback command
|
||||||
|
handleJSON(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (String(topic) == topicAddMelody) {
|
||||||
|
// Handle adding melody
|
||||||
|
Serial.println("Adding melody...");
|
||||||
|
// You can call a function here to handle adding the melody
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Handle unknown topics
|
||||||
|
Serial.println("Unknown topic received.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
28
build/sketch/Timers.hpp
Normal file
28
build/sketch/Timers.hpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\Timers.hpp"
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
extern volatile uint64_t startTime;
|
||||||
|
extern melody_attributes melody;
|
||||||
|
extern volatile bool playing;
|
||||||
|
|
||||||
|
void durationTimer(void *param);
|
||||||
|
|
||||||
|
|
||||||
|
void durationTimer(void *param){
|
||||||
|
|
||||||
|
// SETUP TASK
|
||||||
|
|
||||||
|
for (;;){
|
||||||
|
|
||||||
|
if (playing){
|
||||||
|
uint64_t now = millis();
|
||||||
|
uint64_t timeToStop = startTime + melody.duration;
|
||||||
|
if (now > timeToStop) {
|
||||||
|
playing = false;
|
||||||
|
Serial.println("Time Limit Reached. Stopping !");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
78
build/sketch/bellEngine.hpp
Normal file
78
build/sketch/bellEngine.hpp
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\bellEngine.hpp"
|
||||||
|
// MELODY PLAYBACK WILL BE HANDLED HERE
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
extern volatile bool playing;
|
||||||
|
extern melody_attributes melody;
|
||||||
|
extern uint16_t relayMask;
|
||||||
|
extern bool forceStop;
|
||||||
|
|
||||||
|
void loop_playback(std::vector<uint16_t> &melody_steps);
|
||||||
|
void itsHammerTime(uint16_t note);
|
||||||
|
|
||||||
|
|
||||||
|
void bellEngine(void *parameter) {
|
||||||
|
|
||||||
|
// SETUP TASK
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
|
||||||
|
// Playback until stopped (Completes AT LEAST 1 full loop)
|
||||||
|
loop_playback(melody_steps);
|
||||||
|
|
||||||
|
/*
|
||||||
|
UBaseType_t highWaterMark = uxTaskGetStackHighWaterMark(NULL);
|
||||||
|
Serial.print("Stack high water mark: ");
|
||||||
|
Serial.println(highWaterMark);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void loop_playback(std::vector<uint16_t> &melody_steps) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while(playing){
|
||||||
|
|
||||||
|
// iterate through the beats and call the bell mechanism on each beat
|
||||||
|
for (uint16_t note : melody_steps) {
|
||||||
|
if (forceStop) return;
|
||||||
|
itsHammerTime(note);
|
||||||
|
int tempo = melody.speed;
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(tempo));
|
||||||
|
}
|
||||||
|
|
||||||
|
// pause for "interval_duration"
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(melody.interval_duration));
|
||||||
|
|
||||||
|
// pause for standard "breath-out" duration if interval was less than 3000ms
|
||||||
|
if (melody.interval_duration<3000) vTaskDelay(pdMS_TO_TICKS(3000));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void itsHammerTime(uint16_t note){
|
||||||
|
|
||||||
|
// THIS NEEDS REWORK, TO WAIT, DYNAMICLY PER RELAY
|
||||||
|
// MUST BE CONFIGURABLE REMOTELY
|
||||||
|
|
||||||
|
for (uint8_t i=0; i<16; i++) {
|
||||||
|
if (note & (1 << i)) {
|
||||||
|
relays.digitalWrite(i, LOW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vTaskDelay(pdMS_TO_TICKS(relayDurations[0]));
|
||||||
|
|
||||||
|
for (uint8_t i=0; i<16; i++) {
|
||||||
|
relays.digitalWrite(i, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
11
build/sketch/config.h
Normal file
11
build/sketch/config.h
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\config.h"
|
||||||
|
const char* ssid = "SmartNet";
|
||||||
|
const char* password = "smartpass";
|
||||||
|
const char* hostname = "ESP32_mqtt_test";
|
||||||
|
|
||||||
|
IPAddress ip(10, 98, 30, 150);
|
||||||
|
IPAddress gateway(10, 98, 30, 1);
|
||||||
|
IPAddress subnet(255, 255, 255, 0);
|
||||||
|
|
||||||
|
#define MQTT_USER "esp32_vesper"
|
||||||
|
#define MQTT_PASS "vesper"
|
||||||
92
build/sketch/functions.hpp
Normal file
92
build/sketch/functions.hpp
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\functions.hpp"
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
extern std::vector<uint16_t> melody_steps;
|
||||||
|
|
||||||
|
void setMelodyAttributes(JsonDocument doc);
|
||||||
|
void loadMelodyInRAM(std::vector<uint16_t> &melody_steps);
|
||||||
|
|
||||||
|
|
||||||
|
void handleJSON(String * payload) {
|
||||||
|
|
||||||
|
JsonDocument doc;
|
||||||
|
DeserializationError error = deserializeJson(doc, payload);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
Serial.print("deserializeJson() failed: ");
|
||||||
|
Serial.println(error.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setMelodyAttributes(doc);
|
||||||
|
loadMelodyInRAM(melody_steps);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void setMelodyAttributes(JsonDocument doc){
|
||||||
|
|
||||||
|
|
||||||
|
melody.name = doc["name"].as<const char*>(); // Convert to std::string "name" : "eortastiko"
|
||||||
|
melody.id = doc["id"].as<uint16_t>();
|
||||||
|
melody.duration = doc["duration"].as<uint32_t>();
|
||||||
|
melody.infinite_play = doc["infinite"].as<bool>();
|
||||||
|
melody.interval_duration = doc["inter_dur"].as<uint16_t>();
|
||||||
|
melody.speed = doc["speed"].as<uint16_t>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Print Just for Debugging Purposes
|
||||||
|
Serial.printf("Name: %s, ID: %d, Duration: %lu, Inf: %s, Inter: %d, Speed: %d\n",
|
||||||
|
melody.name.c_str(),
|
||||||
|
melody.id,
|
||||||
|
melody.duration,
|
||||||
|
melody.infinite_play ? "true" : "false",
|
||||||
|
melody.interval_duration,
|
||||||
|
melody.speed);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void loadMelodyInRAM(std::vector<uint16_t> &melody_steps) {
|
||||||
|
|
||||||
|
//if (!newMelody || !playing) return;
|
||||||
|
|
||||||
|
// read the file and save in RAM
|
||||||
|
|
||||||
|
std::string filePath = "/" + melody.name + ".bin";
|
||||||
|
Serial.println("New Melody Selected !!!");
|
||||||
|
Serial.println("Reading data from file...");
|
||||||
|
//Serial.println(filePath);
|
||||||
|
File bin_file = SPIFFS.open(filePath.c_str(), "r");
|
||||||
|
if (!bin_file) {
|
||||||
|
Serial.println("Failed to Open File");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
size_t fileSize = bin_file.size();
|
||||||
|
size_t steps = fileSize / 2;
|
||||||
|
melody_steps.resize(steps);
|
||||||
|
|
||||||
|
Serial.print("Opened File ! Size: ");
|
||||||
|
Serial.print(fileSize);
|
||||||
|
Serial.print(" Steps: ");
|
||||||
|
Serial.println(steps);
|
||||||
|
|
||||||
|
for (size_t i=0; i<steps; i++){
|
||||||
|
melody_steps[i] = bin_file.read() << 8 | bin_file.read();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i=0; i<steps; i++){
|
||||||
|
Serial.print("Current Step: ");
|
||||||
|
Serial.printf("%03d // ", i);
|
||||||
|
Serial.print(" HEX Value: ");
|
||||||
|
Serial.printf("0x%04X\n", melody_steps[i]);
|
||||||
|
}
|
||||||
|
Serial.println("Closing File");
|
||||||
|
bin_file.close();
|
||||||
|
|
||||||
|
// closing the file
|
||||||
|
|
||||||
|
}
|
||||||
1
build/sketch/hammerTime.hpp
Normal file
1
build/sketch/hammerTime.hpp
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\hammerTime.hpp"
|
||||||
108
build/sketch/vesper.ino.cpp
Normal file
108
build/sketch/vesper.ino.cpp
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
#include <Arduino.h>
|
||||||
|
#line 1 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\vesper.ino"
|
||||||
|
#include <WiFi.h>
|
||||||
|
#include <AsyncMqttClient.h>
|
||||||
|
#include <ArduinoJson.h>
|
||||||
|
#include <FS.h>
|
||||||
|
#include <SPIFFS.h>
|
||||||
|
#include <string>
|
||||||
|
#include <Wire.h>
|
||||||
|
#include <Adafruit_PCF8574.h>
|
||||||
|
|
||||||
|
#define PCF8574_ADDR 0x24
|
||||||
|
Adafruit_PCF8574 relays;
|
||||||
|
|
||||||
|
#define DEV_ID "id-96638646"
|
||||||
|
|
||||||
|
struct melody_attributes {
|
||||||
|
std::string name; // Contains the name of each Melody saved
|
||||||
|
uint16_t id; // The (internal) ID of the selected melody
|
||||||
|
uint32_t duration; // Indicates the total Duration in Minutes
|
||||||
|
bool infinite_play; // Infinite Loop Indicator (If True the melody will loop forever or until stoped, with pauses of "interval duration in between loops")
|
||||||
|
uint16_t interval_duration; // Indicates the Duration of the Interval between finished loops, IF "inf" is true
|
||||||
|
uint16_t speed; // Indicates the Speed in 9 Steps. 1-9 (Steps can be adjusted in the bellEngine function)
|
||||||
|
};
|
||||||
|
|
||||||
|
melody_attributes melody;
|
||||||
|
std::vector<uint16_t> melody_steps;
|
||||||
|
|
||||||
|
volatile bool playing = false;
|
||||||
|
uint16_t relayMask = 0; // Bitmask indicating which relays to activate
|
||||||
|
uint8_t relayDurations[16] = {100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100}; // Deactivation timers for each relay in milliseconds
|
||||||
|
volatile uint64_t startTime = 0;
|
||||||
|
bool forceStop = false;
|
||||||
|
|
||||||
|
#include "functions.hpp"
|
||||||
|
#include "config.h" // Sustituir con datos de vuestra red
|
||||||
|
#include "MQTT.hpp"
|
||||||
|
#include "ESP32_Utils.hpp"
|
||||||
|
#include "ESP32_Utils_MQTT_Async.hpp"
|
||||||
|
#include "bellEngine.hpp"
|
||||||
|
#include "hammerTime.hpp"
|
||||||
|
#include "Timers.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
TaskHandle_t bellEngineHandle = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#line 47 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\vesper.ino"
|
||||||
|
void setup();
|
||||||
|
#line 99 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\vesper.ino"
|
||||||
|
void loop();
|
||||||
|
#line 47 "C:\\Users\\espi_\\Documents\\Arduino\\vesper\\vesper.ino"
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
// Initialize Serial Communications & I2C Bus (for debugging)
|
||||||
|
Serial.begin(115200);
|
||||||
|
delay(50);
|
||||||
|
|
||||||
|
// Initialize PCF8574
|
||||||
|
Wire.begin(4,15);
|
||||||
|
relays.begin(PCF8574_ADDR, &Wire);
|
||||||
|
// Initialize Relays
|
||||||
|
for (uint8_t p=0; p<6; p++){
|
||||||
|
relays.pinMode(p, OUTPUT);
|
||||||
|
relays.digitalWrite(p, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize SPIFFS
|
||||||
|
if (!SPIFFS.begin(true)) { // 'true' means format SPIFFS if initialization fails
|
||||||
|
Serial.println("Failed to mount SPIFFS");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Serial.println("SPIFFS mounted successfully");
|
||||||
|
delay(50);
|
||||||
|
|
||||||
|
|
||||||
|
// Initialize WiFi and MQTT
|
||||||
|
WiFi.onEvent(WiFiEvent);
|
||||||
|
InitMqtt();
|
||||||
|
ConnectWiFi_STA();
|
||||||
|
delay(1000);
|
||||||
|
|
||||||
|
xTaskCreatePinnedToCore(
|
||||||
|
bellEngine, // Task function
|
||||||
|
"bellEngine", // Task name
|
||||||
|
8192, // Stack size
|
||||||
|
NULL, // Task input parameters
|
||||||
|
1, // Task priority, be carefull when changing this
|
||||||
|
&bellEngineHandle, // Task handle, add one if you want control over the task (resume or suspend the task)
|
||||||
|
1 // Core to run the task on
|
||||||
|
);
|
||||||
|
|
||||||
|
xTaskCreatePinnedToCore(
|
||||||
|
durationTimer, // Task function
|
||||||
|
"durationTimer", // Task name
|
||||||
|
8192, // Stack size
|
||||||
|
NULL, // Task input parameters
|
||||||
|
1, // Task priority, be carefull when changing this
|
||||||
|
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
|
||||||
|
1 // Core to run the task on
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
}
|
||||||
248
build/sketch/vesper.ino.cpp.d
Normal file
248
build/sketch/vesper.ino.cpp.d
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\vesper.ino.cpp.o: \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\vesper.ino.cpp \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Arduino.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp_arduino_version.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/esp_additions/include/freertos/FreeRTOSConfig.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/esp_additions/arch/xtensa/include/freertos/FreeRTOSConfig_arch.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/xtensa_config.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/hal.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/core.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtensa-versions.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/core-isa.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/core-matmap.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/tie.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/system.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/xtensa_context.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtensa_context.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/corebits.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtruntime-frames.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/projdefs.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/portable.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/deprecated_definitions.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtruntime.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/specreg.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtruntime-core-state.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xt_instr_macros.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtruntime.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/spinlock.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_cpu.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/soc_caps.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtensa_api.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xtensa/xtensa_context.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/include/xt_utils.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/xtensa/esp32/include/xtensa/config/extreg.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_bit_defs.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_attr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_intr_alloc.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_err.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_compiler.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_system/include/esp_private/crosscore_int.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_macros.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_assert.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_memory_utils.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/soc.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_assert.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/reg_base.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/newlib/platform_include/esp_newlib.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/heap/include/esp_heap_caps.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/heap/include/multi_heap.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_rom/include/esp_rom_sys.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/reset_reasons.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_system/include/esp_system.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_common/include/esp_idf_version.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portbenchmark.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/mpu_wrappers.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/task.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/list.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/semphr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/queue.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/task.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_sleep.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/touch_sensor_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/gpio_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/queue.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/event_groups.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/freertos/FreeRTOS-Kernel/include/freertos/timers.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-log.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_timer/include/esp_timer.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_etm.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_rom/include/esp32/rom/ets_sys.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/log/include/esp_log.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/log/include/esp_log_internal.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-matrix.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/gpio_sig_map.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-uart.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/uart_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/clk_tree_defs.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-gpio.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\variants\esp32/pins_arduino.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/driver/gpio/include/driver/gpio.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_rom/include/esp_rom_gpio.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/gpio_pins.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/driver/gpio/include/driver/gpio_etm.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-touch.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-dac.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-adc.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-spi.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-i2c.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-ledc.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/ledc_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-rmt.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-sigmadelta.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-timer.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/driver/gptimer/include/driver/gptimer_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/timer_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-bt.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-psram.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-rgb-led.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-cpu.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp8266-compat.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/soc/esp32/include/soc/gpio_reg.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/stdlib_noniso.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/binary.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/extra_attr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/WCharacter.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/WString.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/pgmspace.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Stream.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Print.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Printable.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/IPAddress.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/ip_addr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/opt.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/port/include/lwipopts.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/newlib/platform_include/sys/ioctl.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/newlib/platform_include/sys/poll.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_system/include/esp_task.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_random.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/port/include/sntp/sntp_get_set_time.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/port/include/sockets_ext.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/port/freertos/include/arch/sys_arch.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/debug.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/arch.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/port/esp32xx/include/arch/cc.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/newlib/platform_include/errno.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/def.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/ip4_addr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/ip6_addr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/def.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/ip6_zone.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_netif/include/esp_netif_ip_addr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Client.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Server.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Udp.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/HardwareSerial.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/HWCDC.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/USBCDC.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Esp.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_partition/include/esp_partition.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/hal/cpu_hal.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/hal/cpu_ll.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/io_pin_remap.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Arduino.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFi.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Print.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiType.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_wifi/include/esp_wifi_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_wifi/include/esp_private/esp_wifi_types_private.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/esp_interface.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_event/include/esp_event_base.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiSTA.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiGeneric.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_event/include/esp_event.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_event/include/esp_event_base.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_wifi/include/esp_smartconfig.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_netif/include/esp_netif_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_netif/include/esp_netif_ip_addr.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_eth/include/esp_eth_driver.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_eth/include/esp_eth_com.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/eth_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_eth/include/esp_eth_spec.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_eth/include/esp_eth_mac.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/driver/spi/include/driver/spi_master.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/hal/include/hal/spi_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/driver/spi/include/driver/spi_common.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_system/include/esp_ipc.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_hw_support/include/intr_types.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_eth/include/esp_eth_phy.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/espressif__network_provisioning/include/network_provisioning/manager.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/protocomm/include/common/protocomm.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/protocomm/include/security/protocomm_security.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/espressif__network_provisioning/include/network_provisioning/network_config.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/Network.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkInterface.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Printable.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkEvents.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkManager.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/WString.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkClient.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Client.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkServer.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Server.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkUdp.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/Udp.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/cbuf.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/esp_ringbuf/include/freertos/ringbuf.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiAP.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiScan.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiClient.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiServer.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\WiFi\src/WiFiUdp.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Network\src/NetworkUdp.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\Async_TCP\src/AsyncTCP.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/pbuf.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32/include/lwip/lwip/src/include/lwip/err.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Flags.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/ParsingInformation.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/MessageProperties.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Helpers.hpp \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-log.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Callbacks.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/DisconnectReasons.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Errors.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Storage.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Packet.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/ConnAckPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/PingRespPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/SubAckPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/UnsubAckPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/PublishPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/PubRelPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/PubAckPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/PubRecPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/PubCompPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/Connect.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/OutPacket.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/PingReq.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/PubAck.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/Disconn.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/Subscribe.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/Unsubscribe.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\AsyncMqttClient\src/AsyncMqttClient/Packets/Out/Publish.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Configuration.hpp \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\FS\src/FS.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\SPIFFS\src/SPIFFS.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\Wire\src/Wire.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/HardwareI2C.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\Adafruit_PCF8574/Adafruit_PCF8574.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_BusIO_Register.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_I2CDevice.h \
|
||||||
|
C:\Users\espi_\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\libraries\SPI\src/SPI.h \
|
||||||
|
C:\Users\espi_\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.7\cores\esp32/esp32-hal-spi.h \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\functions.hpp \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\config.h \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\MQTT.hpp \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\ESP32_Utils.hpp \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\ESP32_Utils_MQTT_Async.hpp \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\bellEngine.hpp \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\hammerTime.hpp \
|
||||||
|
c:\Users\espi_\Documents\Arduino\vesper\build\sketch\Timers.hpp
|
||||||
BIN
build/vesper.ino.bootloader.bin
Normal file
BIN
build/vesper.ino.bootloader.bin
Normal file
Binary file not shown.
9
config.h
9
config.h
@@ -2,9 +2,14 @@ const char* ssid = "SmartNet";
|
|||||||
const char* password = "smartpass";
|
const char* password = "smartpass";
|
||||||
const char* hostname = "ESP32_mqtt_test";
|
const char* hostname = "ESP32_mqtt_test";
|
||||||
|
|
||||||
|
const IPAddress MQTT_HOST(10,98,20,10);
|
||||||
|
const int MQTT_PORT = 1883;
|
||||||
|
|
||||||
|
#define MQTT_USER "esp32_vesper"
|
||||||
|
#define MQTT_PASS "vesper"
|
||||||
|
|
||||||
IPAddress ip(10, 98, 30, 150);
|
IPAddress ip(10, 98, 30, 150);
|
||||||
IPAddress gateway(10, 98, 30, 1);
|
IPAddress gateway(10, 98, 30, 1);
|
||||||
IPAddress subnet(255, 255, 255, 0);
|
IPAddress subnet(255, 255, 255, 0);
|
||||||
|
|
||||||
#define MQTT_USER "esp32_vesper"
|
#define DEV_ID "id-96638646"
|
||||||
#define MQTT_PASS "vesper"
|
|
||||||
|
|||||||
BIN
data/data.bin
BIN
data/data.bin
Binary file not shown.
BIN
data/melody1.bin
BIN
data/melody1.bin
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
[0000000000000001,0000000000000000,0000000000000010,0000000000000000,0000000000000001,0100000000010010,0000000000000001,0000000000001010,0000000000000000,0000000000000001]
|
|
||||||
BIN
data/melody2.bin
Normal file
BIN
data/melody2.bin
Normal file
Binary file not shown.
BIN
data/melody3.bin
Normal file
BIN
data/melody3.bin
Normal file
Binary file not shown.
@@ -1,71 +1,70 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
extern volatile bool playing;
|
extern std::vector<uint16_t> melody_steps;
|
||||||
|
|
||||||
|
|
||||||
void playback(JsonDocument doc){
|
void setMelodyAttributes(JsonDocument doc);
|
||||||
if (doc["playback"].as<bool>()){
|
void loadMelodyInRAM(std::vector<uint16_t> &melody_steps);
|
||||||
playing = true;
|
|
||||||
Serial.println("START Playback!");
|
|
||||||
}
|
|
||||||
else if (doc["playback"].as<bool>()){
|
|
||||||
playing = false;
|
|
||||||
Serial.println("STOP Playback!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void selectMelody(JsonDocument doc){
|
void setMelodyAttributes(JsonDocument doc){
|
||||||
|
|
||||||
melody.name = doc["name"].as<const char*>(); // Convert to std::string
|
melody.name = doc["name"].as<const char*>(); // Convert to std::string "name" : "eortastiko"
|
||||||
melody.id = doc["id"].as<uint16_t>();
|
melody.id = doc["id"].as<uint16_t>();
|
||||||
melody.duration = doc["duration"].as<uint32_t>();
|
melody.duration = doc["duration"].as<uint32_t>();
|
||||||
melody.infinite_play = doc["infinite"].as<bool>();
|
melody.infinite_play = doc["infinite"].as<bool>();
|
||||||
melody.interval_duration = doc["inter_dur"].as<uint16_t>();
|
melody.interval = doc["interval"].as<uint32_t>();
|
||||||
melody.speed = doc["speed"].as<uint8_t>();
|
melody.speed = doc["speed"].as<uint16_t>();
|
||||||
|
melody.loop_duration = doc["loop_dur"].as<uint32_t>();
|
||||||
|
|
||||||
Serial.printf("Name: %s, ID: %d, Duration: %lu, Inf: %s, Inter: %d, Speed: %d\n",
|
// Print Just for Debugging Purposes
|
||||||
|
Serial.printf("Name: %s, ID: %d, Total Duration: %lu, Loop Duration: %lu, Interval: %d, Speed: %d, Inf: %s\n",
|
||||||
melody.name.c_str(),
|
melody.name.c_str(),
|
||||||
melody.id,
|
melody.id,
|
||||||
melody.duration,
|
melody.duration,
|
||||||
melody.infinite_play ? "true" : "false",
|
melody.loop_duration,
|
||||||
melody.interval_duration,
|
melody.interval,
|
||||||
melody.speed);
|
melody.speed,
|
||||||
|
melody.infinite_play ? "true" : "false"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleJSON(String payload) {
|
void loadMelodyInRAM(std::vector<uint16_t> &melody_steps) {
|
||||||
|
|
||||||
JsonDocument doc;
|
// read the file and save in RAM
|
||||||
DeserializationError error = deserializeJson(doc, payload);
|
|
||||||
|
|
||||||
if (error) {
|
std::string filePath = "/" + melody.name + ".bin";
|
||||||
Serial.print("deserializeJson() failed: ");
|
Serial.println("New Melody Selected !!!");
|
||||||
Serial.println(error.c_str());
|
Serial.println("Reading data from file...");
|
||||||
|
//Serial.println(filePath);
|
||||||
|
File bin_file = SPIFFS.open(filePath.c_str(), "r");
|
||||||
|
if (!bin_file) {
|
||||||
|
Serial.println("Failed to Open File");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectMelody(doc);
|
|
||||||
playback(doc);
|
size_t fileSize = bin_file.size();
|
||||||
|
size_t steps = fileSize / 2;
|
||||||
|
melody_steps.resize(steps);
|
||||||
|
|
||||||
|
Serial.print("Opened File ! Size: ");
|
||||||
|
Serial.print(fileSize);
|
||||||
|
Serial.print(" Steps: ");
|
||||||
|
Serial.println(steps);
|
||||||
|
|
||||||
|
for (size_t i=0; i<steps; i++){
|
||||||
|
melody_steps[i] = bin_file.read() << 8 | bin_file.read();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i=0; i<steps; i++){
|
||||||
|
Serial.print("Current Step: ");
|
||||||
|
Serial.printf("%03d // ", i);
|
||||||
|
Serial.print(" HEX Value: ");
|
||||||
|
Serial.printf("0x%04X\n", melody_steps[i]);
|
||||||
|
}
|
||||||
|
Serial.println("Closing File");
|
||||||
|
bin_file.close();
|
||||||
|
|
||||||
|
// closing the file
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
possible topics:
|
|
||||||
|
|
||||||
vesper/client-id/control
|
|
||||||
/play
|
|
||||||
/stop
|
|
||||||
|
|
||||||
vesper/client-id/select_melody
|
|
||||||
|
|
||||||
vesper/client-id/update_melody
|
|
||||||
|
|
||||||
vesper/client-id/add_melody
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
// MELODY PLAYBACK WILL BE HANDLED HERE
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <Adafruit_PCF8574.h>
|
|
||||||
#include <Wire.h>
|
|
||||||
|
|
||||||
#define PCF8574_ADDR 0x24 // Change the address if it's different
|
|
||||||
Adafruit_PCF8574 pcf8574; // Create an instance of the PCF8574 class
|
|
||||||
|
|
||||||
extern volatile bool playing;
|
|
||||||
|
|
||||||
void bellEngine(void *parameter);
|
|
||||||
void tempEngine(void *parameter);
|
|
||||||
|
|
||||||
void bellEngine(void *parameter) {
|
|
||||||
|
|
||||||
uint16_t melodyMap[5500];
|
|
||||||
|
|
||||||
// read the melody from file and store it in RAM
|
|
||||||
File melody_file = SPIFFS.open("/melody1.bin", "r");
|
|
||||||
if (!melody_file) {
|
|
||||||
Serial.println("failed to open file");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (;;){
|
|
||||||
Serial.println("Initializing Melody Read");
|
|
||||||
|
|
||||||
std::vector<uint16_t> melody;
|
|
||||||
|
|
||||||
size_t fileSize = melody_file.size();
|
|
||||||
size_t steps = fileSize / 2;
|
|
||||||
melody.resize(steps);
|
|
||||||
|
|
||||||
Serial.print("Debuggin - FileSize: ");
|
|
||||||
Serial.print(fileSize);
|
|
||||||
Serial.print(" Steps: ");
|
|
||||||
Serial.println(steps);
|
|
||||||
Serial.println("Continuing with Assignment");
|
|
||||||
|
|
||||||
for (size_t i=0; i<steps; i++){
|
|
||||||
melody[i] = melody_file.read() << 8 | melody_file.read();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i=0; i<steps; i++){
|
|
||||||
Serial.print("Current Step: ");
|
|
||||||
Serial.print(i);
|
|
||||||
Serial.print(" Current Beat in HEX: ");
|
|
||||||
Serial.println(melody[i], HEX);
|
|
||||||
}
|
|
||||||
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(5000));
|
|
||||||
Serial.println("Closing File");
|
|
||||||
melody_file.close();
|
|
||||||
|
|
||||||
UBaseType_t highWaterMark = uxTaskGetStackHighWaterMark(NULL);
|
|
||||||
Serial.print("Stack high water mark: ");
|
|
||||||
Serial.println(highWaterMark);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void tempEngine(void *parameter){
|
|
||||||
|
|
||||||
// setup
|
|
||||||
Wire.begin(4, 15);
|
|
||||||
pcf8574.begin(PCF8574_ADDR);
|
|
||||||
pcf8574.pinMode(0, OUTPUT);
|
|
||||||
|
|
||||||
for (;;){
|
|
||||||
//loop
|
|
||||||
if (playing) {
|
|
||||||
Serial.println("DING!");
|
|
||||||
pcf8574.digitalWrite(0, LOW);
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(500));
|
|
||||||
pcf8574.digitalWrite(0, HIGH);
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(500));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
99
vesper.ino
99
vesper.ino
@@ -4,40 +4,96 @@
|
|||||||
#include <FS.h>
|
#include <FS.h>
|
||||||
#include <SPIFFS.h>
|
#include <SPIFFS.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <Wire.h>
|
||||||
|
#include <Adafruit_PCF8574.h>
|
||||||
|
|
||||||
#define DEV_ID "id-96638646"
|
#define PCF8574_ADDR 0x24
|
||||||
|
Adafruit_PCF8574 relays;
|
||||||
|
|
||||||
|
AsyncMqttClient mqttClient;
|
||||||
|
|
||||||
|
class melody_attributes {
|
||||||
|
public:
|
||||||
|
uint16_t id; // The (internal) ID of the selected melody. Not specificly used anywhere atm. Might be used later.
|
||||||
|
std::string name; // Name of the Melody saved. Will be used to read the file: /name.bin
|
||||||
|
uint16_t speed; // Time to wait per beat. (In Miliseconds)
|
||||||
|
uint32_t duration = 15000; // Total Duration that program will run (In Miliseconds)
|
||||||
|
uint32_t loop_duration = 0; // Duration of the playback per segment
|
||||||
|
uint32_t interval = 0; // Indicates the Duration of the Interval between finished segments, IF "inf" is true
|
||||||
|
bool infinite_play = false; // Infinite Loop Indicator (If True the melody will loop forever or until stoped, with pauses of "interval" in between loops)
|
||||||
|
bool isPlaying = false;; // Indicates if the Melody is actually Playing right now.
|
||||||
|
bool isPaused = false; // If playing, indicates if the Melody is Paused
|
||||||
|
uint64_t startTime = 0; // The time-point the Melody started Playing
|
||||||
|
uint64_t loopStartTime = 0; // The time-point the current segment started Playing
|
||||||
|
bool hardStop = false; // Flags a hardstop, immediately.
|
||||||
|
uint64_t pauseTime = 0; // The time-point the melody paused
|
||||||
|
|
||||||
|
void play() {
|
||||||
|
isPlaying = true;
|
||||||
|
hardStop = false;
|
||||||
|
startTime = loopStartTime = millis();
|
||||||
|
Serial.println("Plbck: PLAY");
|
||||||
|
}
|
||||||
|
|
||||||
|
void forceStop() {
|
||||||
|
hardStop = true;
|
||||||
|
isPlaying = false;
|
||||||
|
Serial.println("Plbck: FORCE STOP");
|
||||||
|
}
|
||||||
|
|
||||||
|
void stop() {
|
||||||
|
hardStop = false;
|
||||||
|
isPlaying = false;
|
||||||
|
Serial.println("Plbck: STOP");
|
||||||
|
}
|
||||||
|
|
||||||
|
void pause() {
|
||||||
|
isPaused = true;
|
||||||
|
Serial.println("Plbck: PAUSE");
|
||||||
|
}
|
||||||
|
|
||||||
|
void unpause() {
|
||||||
|
isPaused = false;
|
||||||
|
loopStartTime = millis();
|
||||||
|
Serial.println("Plbck: RESUME");
|
||||||
|
}
|
||||||
|
|
||||||
struct melody_attributes {
|
|
||||||
std::string name; // Contains the name of each Melody saved
|
|
||||||
uint16_t id; // The (internal) ID of the selected melody
|
|
||||||
uint32_t duration; // Indicates the total Duration in Minutes
|
|
||||||
bool infinite_play; // Infinite Loop Indicator (If True the melody will loop forever or until stoped, with pauses of "interval duration in between loops")
|
|
||||||
uint16_t interval_duration; // Indicates the Duration of the Interval between finished loops, IF "inf" is true
|
|
||||||
uint8_t speed; // Indicates the Speed in 9 Steps. 1-9 (Steps can be adjusted in the bellEngine function)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
melody_attributes melody;
|
melody_attributes melody;
|
||||||
|
std::vector<uint16_t> melody_steps;
|
||||||
|
|
||||||
volatile bool playing = false;
|
uint16_t relayMask = 0; // Bitmask indicating which relays to activate
|
||||||
|
uint8_t relayDurations[16] = {5,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100}; // Deactivation timers for each relay in milliseconds
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "functions.hpp"
|
#include "functions.hpp"
|
||||||
#include "config.h" // Sustituir con datos de vuestra red
|
#include "MQTT_Message_Handling.hpp"
|
||||||
#include "MQTT.hpp"
|
#include "MQTT_WiFi_Utilities.hpp"
|
||||||
#include "ESP32_Utils.hpp"
|
#include "PlaybackControls.hpp"
|
||||||
#include "ESP32_Utils_MQTT_Async.hpp"
|
#include "bellEngine.hpp"
|
||||||
#include "melody_handling.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
TaskHandle_t myTaskHandle = NULL;
|
|
||||||
|
TaskHandle_t bellEngineHandle = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
// Initialize Serial Communication (for debuggin)
|
// Initialize Serial Communications & I2C Bus (for debugging)
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
delay(50);
|
delay(50);
|
||||||
|
|
||||||
|
// Initialize PCF8574
|
||||||
|
Wire.begin(4,15);
|
||||||
|
relays.begin(PCF8574_ADDR, &Wire);
|
||||||
|
// Initialize Relays
|
||||||
|
for (uint8_t p=0; p<6; p++){
|
||||||
|
relays.pinMode(p, OUTPUT);
|
||||||
|
relays.digitalWrite(p, HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize SPIFFS
|
// Initialize SPIFFS
|
||||||
if (!SPIFFS.begin(true)) { // 'true' means format SPIFFS if initialization fails
|
if (!SPIFFS.begin(true)) { // 'true' means format SPIFFS if initialization fails
|
||||||
Serial.println("Failed to mount SPIFFS");
|
Serial.println("Failed to mount SPIFFS");
|
||||||
@@ -46,6 +102,7 @@ void setup()
|
|||||||
Serial.println("SPIFFS mounted successfully");
|
Serial.println("SPIFFS mounted successfully");
|
||||||
delay(50);
|
delay(50);
|
||||||
|
|
||||||
|
|
||||||
// Initialize WiFi and MQTT
|
// Initialize WiFi and MQTT
|
||||||
WiFi.onEvent(WiFiEvent);
|
WiFi.onEvent(WiFiEvent);
|
||||||
InitMqtt();
|
InitMqtt();
|
||||||
@@ -58,18 +115,16 @@ void setup()
|
|||||||
8192, // Stack size
|
8192, // Stack size
|
||||||
NULL, // Task input parameters
|
NULL, // Task input parameters
|
||||||
1, // Task priority, be carefull when changing this
|
1, // Task priority, be carefull when changing this
|
||||||
&myTaskHandle, // Task handle, add one if you want control over the task (resume or suspend the task)
|
&bellEngineHandle, // Task handle, add one if you want control over the task (resume or suspend the task)
|
||||||
1 // Core to run the task on
|
1 // Core to run the task on
|
||||||
);
|
);
|
||||||
|
|
||||||
vTaskSuspend(myTaskHandle);
|
|
||||||
|
|
||||||
xTaskCreatePinnedToCore(
|
xTaskCreatePinnedToCore(
|
||||||
tempEngine, // Task function
|
durationTimer, // Task function
|
||||||
"tempEngine", // Task name
|
"durationTimer", // Task name
|
||||||
8192, // Stack size
|
8192, // Stack size
|
||||||
NULL, // Task input parameters
|
NULL, // Task input parameters
|
||||||
1, // Task priority, be carefull when changing this
|
2, // Task priority, be carefull when changing this
|
||||||
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
|
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
|
||||||
1 // Core to run the task on
|
1 // Core to run the task on
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user