diff --git a/ESP8266_DHT__Pushingbox_GoogleSheets b/ESP8266_DHT__Pushingbox_GoogleSheets new file mode 100644 index 0000000..ac761a0 --- /dev/null +++ b/ESP8266_DHT__Pushingbox_GoogleSheets @@ -0,0 +1,126 @@ +//----------------------------------------------- +//This sketch is combined from Adafruit DHT sensor and tdicola +//for dht.h library +//Along with some esp8266 NodeMCU specifics from teos009 +// https://learn.adafruit.com/dht/overview +// https://gist.github.com/teos0009/acad7d1e54b97f4b2a88 +//other Authors Arduino and associated Google Script: +//Aditya Riska Putra +//Ahmed Reza Rafsanzani +//Ryan Eko Saputro +//See Also +//http://jarkomdityaz.appspot.com/ +// +//ELINS UGM +// +//Modified for Hackster.io project to the ESP8266 from +//a Ethernet Sheild project +//by Stephen Borsay +//Since Arduino can't handle https, we need to use Pushingbox API +//(uses http)to run +//the Google Script (uses https). + + +#include "ESP8266WiFi.h" +#include "DHT.h" +#define DHTPIN 2 // what digital pin we're connected to + //pin2 to D4 on esp board + +// Uncomment whatever DHT sensor type you're using! +#define DHTTYPE DHT11 // DHT 11 +//#define DHTTYPE DHT21 // DHT 21 +//#define DHTTYPE DHT22 // DHT 22 + +DHT dht(DHTPIN,DHTTYPE); + + +const char WEBSITE[] = "api.pushingbox.com"; //pushingbox API server +const String devid = ""; //device ID from Pushingbox + +const char* MY_SSID = "