|
|
// Copyright 2015 Google Inc. |
|
// |
|
// Licensed under the Apache License, Version 2.0 (the “License”); |
|
// you may not use this file except in compliance with the License. |
|
// You may obtain a copy of the License at |
|
// |
|
// http://www.apache.org/licenses/LICENSE-2.0 |
|
// |
|
// Unless required by applicable law or agreed to in writing, software |
|
// distributed under the License is distributed on an “AS IS” BASIS, |
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
// See the License for the specific language governing permissions and |
|
// limitations under the License. |
|
// |
|
|
|
// FirebaseDemo_ESP8266 is a sample that demo the different functions |
|
// of the FirebaseArduino API. |
|
|
|
#include <ESP8266WiFi.h> |
|
#include <FirebaseArduino.h> |
|
|
|
// Set these to run example. |
|
#define FIREBASE_HOST “esri-eea51.com“ |
|
#define FIREBASE_AUTH “qULRQbnuz————-Q1FxHvM“ |
|
#define WIFI_SSID “kavin“ |
|
#define WIFI_PASSWORD “123456345“ |
|
|
|
void setup() { |
|
Serial.begin(9600); |
|
pinMode(D1, OUTPUT); |
|
// connect to wifi. |
|
WiFi.begin(WIFI_SSID, WIFI_PASSWORD); |
|
Serial.print(“connecting“); |
|
while (WiFi.status() != WL_CONNECTED) { |
|
Serial.print(“.“); |
|
delay(500); |
|
} |
|
Serial.println(); |
|
Serial.print(“connected: “); |
|
Serial.println(WiFi.localIP()); |
|
|
|
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); |
|
Firebase.set(“LED_STATUS“, 0); |
|
} |
|
|
|
int n = 0; |
|
|
|
void loop() { |
|
// get value |
|
n = Firebase.getInt(“LED_STATUS“); |
|
// handle error |
|
if (n==1) { |
|
Serial.println(“LED ON“); |
|
digitalWrite(D1,HIGH); |
|
return; |
|
delay(10); |
|
} |
|
else { |
|
Serial.println(“LED OFF“); |
|
digitalWrite(D1,LOW); |
|
return; |
|
|
|
} |
|
} |
i got:
Exception (28):
epc1=0x402039ca epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3ffefaa0 end: 3ffeffc0 offset: 01a0
>>>stack>>>
……
I alway getting a trouble with like this
Arduino: 1.8.7 Hourly Build 2018/09/10 06:33 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Build options changed, rebuilding all
Multiple libraries were found for "FirebaseArduino.h"
Used: C:UsersTVSHDocumentsArduinolibrariesfirebase-arduino-master
In file included from C:UsersTVSHDocumentsArduinolibrariesfirebase-arduino-mastersrc/FirebaseArduino.h:22:0,
Not used: F:ARDUINOarduino-nightlylibrariesfirebase-arduino-master
Not used: F:ARDUINOarduino-nightlylibrariesfirebase-arduino-master
Not used: F:ARDUINOarduino-nightlylibrariesfirebase-arduino-master
from F:ARDUINOarduino-nightlylibrariesfirebase-arduino-masterexamplesFirebaseDemo_ESP8266FirebaseDemo_ESP8266.ino:21:
Not used: F:ARDUINOarduino-nightlylibrariesfirebase-arduino-master
C:UsersTVSHDocumentsArduinolibrariesfirebase-arduino-mastersrc/Firebase.h:26:25: fatal error: ArduinoJson.h: No such file or directory
#include
^
compilation terminated.
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
ok, i just download library ArduinoJson.h
My system stopped update the data from Firebase after a while(like 10 minutes). Wifi still connected. How to solve this problem?
firebase free spark plan includes limited number of set/get (r/w) might be all r/w finished
Hello, sir i have done all the steps as mentioned in this tutorial, but still my realtime database show myproject:NULL instead of LED_STATUS or anything….kindly guide me through this
Rapidly this kind of link may well irrefutably find yourself famous among each creating many individuals, as a result of thorough posts and also critiques and also scores. led light panel
No idea about the power. I will try measuring the current drain using an ammeter. Again no idea about the lux. I couldnt find the datasheets of the LEDs used in this panel
No idea about the power. I will try measuring the current drain using an ammeter. Again no idea about the lux. I couldnt find the datasheets of the LEDs used in this panel led flat panel light
[…] features and not customizable. Till this post we have already come a very long way, We started from simple led control switch program using custom android app and firebase realtime database, till controlling led using google assistant by creating our custom chat […]