|
| 1 | +# FirebaseNeoPixel |
| 2 | + |
| 3 | +FirebaseNeoPixel is a sample that shows how to set pixel data from Firebase web app. |
| 4 | + |
| 5 | +## Hardware setup |
| 6 | + |
| 7 | +1. Get a [Feather Huzzah](https://www.adafruit.com/product/2821) |
| 8 | +1. Get a [FeatherWing NeoPixel](https://www.adafruit.com/product/2945) |
| 9 | +1. Cut the default jumper and [solder](https://learn.adafruit.com/adafruit-neopixel-featherwing/pinouts) the one forfor `pin13` |
| 10 | +1. Solder female headers on the `Feather Huzzah` |
| 11 | +1. Solder mail headers on the `FeatherWing NeoPixel` |
| 12 | +1. Stack the `FeatherWing NeoPixel` on top of the `Feather Huzzah` |
| 13 | + |
| 14 | +## Software setup |
| 15 | + |
| 16 | +1. Install [Arduino 1.6.9](https://www.arduino.cc/en/Main/Software) |
| 17 | +1. Install [Arduino ESP8266 core](https://github.com/esp8266/Arduino#installing-with-boards-manager) |
| 18 | +1. Download [FirebaseArduino library](https://github.com/googlesamples/firebase-arduino/archive/master.zip) |
| 19 | +1. Start Arduino |
| 20 | +1. Click `Sketch > Include Library > Add .ZIP Library...` |
| 21 | +1. Choose `firebase-arduino-master.zip` downloaded in step `3.` |
| 22 | +1. Install the following libraries using `Sketch > Include Library > Manage Libraries...`: |
| 23 | + - [Adafruit_NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel) |
| 24 | + |
| 25 | +## Configuration |
| 26 | + |
| 27 | +1. Go to https://www.firebase.com/ and create a new Firebase |
| 28 | +1. Copy the `Firebase Hostname` |
| 29 | +1. Go to `Secrets` |
| 30 | +1. Click `Firebase Secrets > Show` |
| 31 | +1. Copy the `Firebase Secret` |
| 32 | +1. Start Arduino |
| 33 | +1. Click `File > Examples > FirebaseArduino > FirebaseRoom_ESP8266` |
| 34 | +1. Replace `SSID` and `PASSWORD` with WiFi credentials |
| 35 | +1. Replace `example.firebaseio.com` with the `Firebase Hostname` from step `2.` |
| 36 | +1. Replace `secret_or_token` with `Firebase Secret` from step `5.` |
| 37 | +1. Click `Sketch > Upload` |
| 38 | +1. Open `public/index.html` with a text editor |
| 39 | +1. Replace `example.firebaseio.com` with the `Firebase Hostname` from step `2.` |
| 40 | +1. Replace `secret_or_token` with `Firebase Secret` from step `5.` |
| 41 | +1. Deploy the `public` directory to Firebase hosting |
| 42 | +``` |
| 43 | +npm install -g firebase-tools bower |
| 44 | +(cd public && bower install) |
| 45 | +firebase login |
| 46 | +firebase init |
| 47 | +firebase deploy |
| 48 | +``` |
| 49 | + |
| 50 | +## Play |
| 51 | + |
| 52 | +1. Go to the firebase hosting URL: `firebase-name.firebaseapp.com` |
| 53 | +1. Use the color picker and paint the NeoPixel table |
| 54 | +1. Watch the NeoPixel being updated to the matching color |
0 commit comments