This simple setup will get you driving your IoT items from miles away in no time!
- open up
/public/index.html
and fill out theconfig
object with all of your Firebase credentials. If you do not have any credentials, create a project at Firebase and follow the setup guide (It will give you your credentials) - Open up terminal (or Command Prompt), and
cd
insdie the IoT-joystick folder - Once you are inside the project, run
npm install
- Open your Firebase project and add two childs:
- joystick_x
- joystick_y
- Run
node app.js
and profit
At this point you should be able to click and drag anywhere on the screen to move the joystick. If you look at your firebase database, you will notice that both of your childs (joystick_x and joystick_y) are updating live. Use the firebase api to access this database from some other device to put the joystick into some good use!