Skip to content

Library for connect ESP8266 devices to IFRA IoT Platform

Notifications You must be signed in to change notification settings

ifraiot/IFRA-SDK-ESP8266

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

IFRAIoT

Example

Send Humidity and Temperature data from ESP8266 device to IFRA IoT Platform.

#include <IFRAIoT.h>
#include <DHT.h>

#define USERNAME "05fd5734-612d-4844-b90b-f554f59f37e2"
#define PASSWORD "7897e894-c899-40c1-9f5a-1daee6826826"

#define WIFI_SSID "ifrasoft"
#define WIFI_PASSWORD "@ifrasoft2020"

IFRAIoT device(USERNAME, PASSWORD);
DHT dht(2, DHT11, 15);

void setup() {
  Serial.begin(115200);
  device.wifiConnection(WIFI_SSID, WIFI_PASSWORD);



  dht.begin();

}

void loop() {
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  device.addMeasure("Humidity", h);
  device.addMeasure("Temperature", t);
  device.send();
  delay(1000);
}

About

Library for connect ESP8266 devices to IFRA IoT Platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages