Adjusted ESP to Rest service.
This commit is contained in:
@@ -8,7 +8,10 @@
|
|||||||
//DHT settings:
|
//DHT settings:
|
||||||
#define DHTPIN 14 // what digital pin we're connected to
|
#define DHTPIN 14 // what digital pin we're connected to
|
||||||
|
|
||||||
#define MEASURESECONDS 60 //shouldn't be < 2sec
|
#define MEASURESECONDS 600 //shouldn't be < 2sec
|
||||||
|
|
||||||
|
#define NODE_ID 1
|
||||||
|
#define ISOUTSIDE 0 //Outside --> 1 ; Inside --> 0
|
||||||
|
|
||||||
// Uncomment whatever type you're using!
|
// Uncomment whatever type you're using!
|
||||||
//#define DHTTYPE DHT11 // DHT 11
|
//#define DHTTYPE DHT11 // DHT 11
|
||||||
@@ -75,7 +78,7 @@ void loop() {
|
|||||||
HTTPClient client;
|
HTTPClient client;
|
||||||
|
|
||||||
// Make a HTTP request:
|
// Make a HTTP request:
|
||||||
String url = "http://raspitemp:1337/abshum/" + String(t) + "/" + String(h);
|
String url = "http://raspitemp:1337/abshum/" + String(t) + "/" + String(h) + "/" + String(NODE_ID) + "/" + String(ISOUTSIDE);
|
||||||
client.begin(url);
|
client.begin(url);
|
||||||
client.GET();
|
client.GET();
|
||||||
client.end();
|
client.end();
|
||||||
|
Reference in New Issue
Block a user