serializers and deserializers
This commit is contained in:
@@ -1,28 +1,45 @@
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
String serializeSensorValue (
|
||||
int sensorId,
|
||||
int deviceId,
|
||||
String sensorType,
|
||||
String unit,
|
||||
int sensorStatus,
|
||||
float temperature,
|
||||
float humidity,
|
||||
float carbonMonoxide,
|
||||
float lat,
|
||||
float lon,
|
||||
long timestamp
|
||||
);
|
||||
|
||||
String serializeActuatorStatus (
|
||||
|
||||
);
|
||||
|
||||
String serializeDevice (
|
||||
|
||||
);
|
||||
|
||||
void deserializeSensorValue (
|
||||
|
||||
);
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include "HTTPClient.h"
|
||||
|
||||
HTTPClient http;
|
||||
|
||||
String serializeSensorValue (
|
||||
int sensorId,
|
||||
int deviceId,
|
||||
String sensorType,
|
||||
String unit,
|
||||
int sensorStatus,
|
||||
float temperature,
|
||||
float humidity,
|
||||
float carbonMonoxide,
|
||||
float lat,
|
||||
float lon,
|
||||
long timestamp
|
||||
);
|
||||
|
||||
String serializeActuatorStatus (
|
||||
int actuatorId,
|
||||
int deviceId,
|
||||
int status,
|
||||
long timestamp
|
||||
);
|
||||
|
||||
String serializeDevice (
|
||||
int sensorId,
|
||||
int deviceId,
|
||||
String sensorType,
|
||||
int status,
|
||||
long timestamp
|
||||
);
|
||||
|
||||
void deserializeSensorValue (
|
||||
int httpResponseCode
|
||||
);
|
||||
|
||||
void deserializeActuatorStatus (
|
||||
int httpResponseCode
|
||||
);
|
||||
|
||||
void deserializeDevice (
|
||||
int httpResponseCode
|
||||
);
|
||||
@@ -1,9 +1,9 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "json.hpp"
|
||||
#include "rest.hpp"
|
||||
#include "wifi.hpp"
|
||||
#include "test.hpp"
|
||||
#include "mqtt.hpp"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "json.hpp"
|
||||
#include "rest.hpp"
|
||||
#include "wifi.hpp"
|
||||
#include "test.hpp"
|
||||
#include "mqtt.hpp"
|
||||
|
||||
#define LED 2
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <HTTPClient.h>
|
||||
|
||||
#define SERVER_IP "192.168.48.151"
|
||||
#include <HTTPClient.h>
|
||||
|
||||
#define SERVER_IP "192.168.48.151"
|
||||
#define SERVER_PORT 80
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "Redmi Note 14 Pro 5G"
|
||||
#define PASSWORD "aitv5949"
|
||||
|
||||
#include <WiFi.h>
|
||||
#include <PubSubClient.h>
|
||||
|
||||
#define SSID "Redmi Note 14 Pro 5G"
|
||||
#define PASSWORD "aitv5949"
|
||||
|
||||
int setup_wifi();
|
||||
Reference in New Issue
Block a user