Skip to content

Instantly share code, notes, and snippets.

@nbortolotti
Created November 10, 2015 00:13
Show Gist options
  • Save nbortolotti/5b13fd029fed624af0e8 to your computer and use it in GitHub Desktop.
Save nbortolotti/5b13fd029fed624af0e8 to your computer and use it in GitHub Desktop.
#include <DHT.h>
#include <Bridge.h>
#define DHTPIN 7
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
void setup() {
Bridge.begin();
dht.begin();
}
void loop() {
int t= dht.readTemperature();
//Temperatura Relativa
Process p;
p.runShellCommand("curl -k -X POST https://arduinonickdemo.firebaseio.com/temperature.json -d '{ \"value\" : " + String(t) + "}'");
while(p.running());
delay(5000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment