|
| 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 | + |