Added Basic MQTT Support and JSON Deserialization
This commit is contained in:
34
vesper.ino
34
vesper.ino
@@ -1,9 +1,31 @@
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
#
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <AsyncMqttClient.h>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include "config.h" // Sustituir con datos de vuestra red
|
||||
#include "JSON_functions.hpp"
|
||||
#include "MQTT.hpp"
|
||||
#include "ESP32_Utils.hpp"
|
||||
#include "ESP32_Utils_MQTT_Async.hpp"
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
|
||||
delay(500);
|
||||
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
InitMqtt();
|
||||
|
||||
ConnectWiFi_STA();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
}
|
||||
void loop()
|
||||
{
|
||||
// EXAMPLE PUBLISH. CHANGE THIS, IF NEEDED.
|
||||
//delay(1000);
|
||||
//PublishMqtt(millis());
|
||||
}
|
||||
Reference in New Issue
Block a user