This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Arduino.h" | |
#include <WiFi.h> | |
#include "esp_log.h" | |
#include "esp_system.h" | |
#include "esp_event.h" | |
#include "mqtt_client.h" | |
#define SECURE_MQTT // Comment this line if you are not using MQTT over SSL | |
#ifdef SECURE_MQTT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double mapf(double val, double in_min, double in_max, double out_min, double out_max) { | |
return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |