|
| 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](http://www.seeedstudio.com/wiki/Wio_Link) |
| 15 | +1. Connect: |
| 16 | + - a [Grove - Vibration Motor](http://www.seeedstudio.com/wiki/Grove_-_Vibration_Motor) on `pin 5` |
| 17 | + - a [Grove - Light Sensor](http://www.seeedstudio.com/wiki/Grove_-_Light_Sensor) on `pin A0` |
| 18 | + - a [Grove - Red LED](http://www.seeedstudio.com/wiki/Grove_-_Red_LED) on `pin 12` |
| 19 | + - a [Grove - Button](http://www.seeedstudio.com/wiki/Grove_-_Button) on `pin 14` |
| 20 | + - a [Grove - Mini Fan](http://www.seeedstudio.com/wiki/Grove_-_Mini_Fan) on `pin 13` |
| 21 | + |
| 22 | +## Configuration |
| 23 | + |
| 24 | +1. Go to https://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 | +- Build a [Firebase web app](https://www.firebase.com/docs/web/) that interacts with the room. |
| 49 | +- Connect other Grove modules to the room and submit new [PRs](https://github.com/googlesamples/firebase-arduino/pulls) |
| 50 | +- Reduce the number of Firebase API calls using `FirebaseObject` or `FirebaseStream`. |
| 51 | +- Watch or star the [GitHub repo repo](https://github.com/googlesamples/firebase-arduino) |
| 52 | +- Give [feedback](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) |
0 commit comments