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
// Code works on Thingsboard, sends telemetry data. // | |
// Thanks ItKindaWorks on the source code. // | |
#include <PubSubClient.h> | |
#include "ESPHelper.h" | |
#include <Metro.h> | |
#include <ESP8266WiFi.h> //ESP8266 Core WiFi Library (you most likely already have this in your sketch) | |
#include <DNSServer.h> //Local DNS Server used for redirecting all requests to the configuration portal | |
#include <ESP8266WebServer.h> //Local WebServer used to serve the configuration portal | |
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager WiFi Configuration Magic |
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 <Esp8266.h> | |
#include "EmonLib.h" | |
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial1(3, 2); /* RX:D3, TX:D2 */ | |
// Kalibracija Senzora | |
#define SAMPLE_COUNT 10 | |
#define VOLT_CAL 258.7 //voltage calibration | |
#define CURRENT_CAL1 61.5 //sensor 1 calibration -- R |