SHARE
TWEET

Untitled

a guest Aug 19th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //#include <SimpleDHT.h>
  2. #include <ESP8266WiFi.h>
  3. #include <FirebaseArduino.h>
  4.  
  5. // Config Firebase
  6. #define FIREBASE_HOST "kanjamefinal1.firebaseio.com"
  7. #define FIREBASE_AUTH "2qQkrN1Obwza1GiKaZwId8TFk749DeMV06PGHgU8"
  8.  
  9. // Config connect WiFi
  10. #define WIFI_SSID "firstwifija"
  11. #define WIFI_PASSWORD "0979244702"
  12.  
  13. int i = 0;
  14.  
  15. void setup() {
  16.   Initialization();
  17.   WiFiConnection();
  18. }
  19. int counter = 0;
  20. void loop() {
  21.  Firebase.setInt("counter", counter++);
  22.  Serial.println(counter);
  23.  delay(2000);
  24. }
  25.  
  26. void Initialization()
  27. {
  28.   Serial.begin(115200);
  29. //  pirMode(LED_BUILTIN, OUTPUT);
  30. }
  31. void WiFiConnection()
  32. {
  33.   WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  34.   Serial.print("connecting");
  35.   while(WiFi.status() != WL_CONNECTED)
  36.   {
  37.     Serial.print(".");
  38.     delay(500);
  39.   }
  40.   Serial.println();
  41.   Serial.print("connected: ");
  42.   Serial.println(WiFi.localIP());
  43.  
  44.   Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top