Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb95bbb1

Browse files
committed
examples/FirebaseRoom: add README
1 parentad35467 commitb95bbb1

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

‎examples/FirebaseRoom_ESP8266/FirebaseRoom_ESP8266.ino‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ void setup() {
5151
Serial.println(WiFi.localIP());
5252

5353
Firebase.begin("example.firebaseio.com","secret_or_token");
54+
Firebase.set("pushbutton",0);
55+
Firebase.set("sunlight",0);
56+
Firebase.set("redlight",0);
57+
Firebase.set("cooldown",0);
58+
Firebase.set("brrr",0);
5459
}
5560

5661
int button =0;
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#Firebase Room
2+
3+
##Software setup
4+
5+
1. Install[Arduino 1.6.9](https://www.arduino.cc/en/Main/Software)
6+
1. Install[Arduino ESP8266 core](https://github.com/esp8266/Arduino#installing-with-boards-manager)
7+
1. Download[FirebaseArduino library](https://github.com/googlesamples/firebase-arduino/archive/master.zip)
8+
1. Start Arduino
9+
1. Click`Sketch > Include Library > Add .ZIP Library...`
10+
1. Choose`firebase-arduino-master.zip` downloaded in step 3.
11+
12+
##Hardware setup
13+
14+
1. Get a Wio-link
15+
1. Connect:
16+
- a grove vibrator motor on`pin 5`
17+
- a grove light sensor on`pin A0`
18+
- a grove red LED on`pin 12`
19+
- a grove push button on`pin 14`
20+
- a grove fan on`pin 13`
21+
22+
##Configuration
23+
24+
1. Go tohttps://www.firebase.com/ and create a new Firebase.
25+
1. Copy the`Firebase Hostname`
26+
1. Go to`Secrets`
27+
1. Click`Firebase Secrets > Shows`
28+
1. Copy the`Firebase Secret`
29+
1. Start Arduino
30+
1. Click`File > Examples > firebase-arduino > FirebaseRoom_ESP8266`
31+
1. Replace`example.firebaseio.com` with the`Firebase Hostname` from step 2.
32+
1. Replace`secret_or_token` with`Firebase Secret` from step 5.
33+
1. Click`Sketch > Upload`
34+
35+
##Play
36+
37+
1. Go to the Firebase console`Data` section
38+
1. Set`redlight` to`1` then`0`
39+
1. Watch the Red LED turn on and off in the room
40+
1. Same for`cooldown` and`brrr`
41+
1. Press the push button in the room
42+
1. Watch the`pushbutton` value change in the Firebase console
43+
1. Put your hand on the light sensor.
44+
1. Watch the`sunlight` value change in the Firebase console
45+
46+
##Homeworks
47+
48+
- Connect other Grove modules to the room and submit new[PRs](https://github.com/googlesamples/firebase-arduino/pulls).
49+
- Reduce the number of Firebase API call using`ArduinoJson`.
50+
- Reduce the number of Firebase API call using`Firebase.stream()`
51+
- Watch or star the[GitHub repo repo](https://github.com/googlesamples/firebase-arduino)
52+
- Give[feedbacks](gitter.im/googlesamples/firebase-arduino)
53+
- Report[bugs](https://github.com/googlesamples/firebase-arduino/issues/new)
54+
-[Fork](https://github.com/googlesamples/firebase-arduino#fork-destination-box) and[contribute](https://github.com/googlesamples/firebase-arduino/blob/master/CONTRIBUTING.md).
55+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp