I was looking for many various ways of storing Arduino data in a server and presenting in client. There are many ways of doing this and one interesting way is Temboo + Google BigQuery. It’s much easier to implement since what you have to do is just follow the steps and it will generate everything including the code for you. For some weird reason this never worked for me and I found that troubleshooting is hell of a thing because you are too much relying on generated code.
Later I found this miracle post in devacron.com mentioning much more easier way with 100% hand written and easy to understand code.
FireBase offers very powerful back-end for apps and offers a cloud based data storage platform which is ideal solution for playground for Arduino. Most fascinating fact with Firebase is that these guys offers 1GB storage, 100 parallel connections and 10GB transfer for there free forever plan which is more than enough to power up even your most complex ‘connected’ home with Arduino.
Only problem with Firebase is that they accept only HTTPS connections which is too much for my UNO to bare. But the article in devacron uses a nice hack by having a PHP middleman to retrieve data from Arduino and send that to Firebase. Even though they didn’t mention any credit in their post, I later found that the hack was done here.

I’ll start the setup from the Firebase side.
First, create a login in Firebase and create a new app.Now go to the app URL and Press the Secrets tab on left bottom. Note down the app URL (Eg: https://myawesomearduino.firebaseio.com) and the secret, we will need it for the next step.
Next, setup hosting for your site. I used free 000webhost.com and so far it served for my purpose. Anyway choosing the hosting is up to you and make sure the host you choose allows uploading php scripts.
After setting up the hosting, upload following firebaseLib.php and firebaseTest.php
In order to test the setup, manually invoke the data feed (Eg: http://myawesomearduio.netau.net/measure_temparature/firebaseTest.php?arduino_data=32.6) and verify the data saved in Firebase.
Next step is to setup Arduino to sense room temperature. I’ve used ds18b20 temperature sensor. This nice article on hacktronics provide all you know to setup ds18b20 sensor.
I have used CC3000 WiFi shield in this example and please read my post on how to connect CC3000 to Arduino Uno.
Given below is the sketch I’ve designed using many other examples.

Upload the sketch to your Arduino and it will start sending temperature readings to the Firebase!
As the last part, I’ve used CanvasJS plot to visualize the data in runtime.
Have a look at my example! http://dsignhome.netau.net/measure_temparature/

Special thanks to everyone who shared their experience which made my attempt a success.
Thanks for reading and please share your thoughts. I’d love to know if there’s better way of doing this
sorry, wrong link. My test feed link is “ardruino-to-firebase.000webhostapp.com/ardruino-to-firebase/firebaseTest.php?arduino_data=32.6”
Hi,
Have you setup firebase correctly in your data feed php (in my case it’s firebaseTest.php)
Please feel free to access my site as i mentioned in below comment and see if it’s working for you 🙂
Cheers!
Hi, my friend. I am trying to send the data from Force Sensitive Resistor to firebase using Arduino. I found your project is great and very similar to mine. However, I am facing a problem after I finished creating the website on 000webhost.com and uploading two files. I can not access the data feed link (“http://myawesomearduio.netau.net/measure_temparature/firebaseTest.php?arduino_data=32.6”) to test it. Can you give some suggestion?
Hi,
My site was down due to 000webhost guys moved their repository.
Now I created it in their new site and you can access my project from following URL:
* Data feed link from arduino
http://dsign-home.000webhostapp.com/measure_temprature/firebaseTest.php?arduino_data=31.6
Dashboard URL:
http://dsign-home.000webhostapp.com/measure_temprature/
excuse me i am beginner
i have followed all your steps but what i don’t understand is that
1) http://myawesomearduio.netau.net/ is this your web address or domain? e.g my website is
http://enggeedi.000webhostapp.com/ and domain is enggeeddi@host22.com
2) measure_temparature where this comes from is it your fire-base database or not?
3) when i uploading the php file to the hosting which folder do i have put it?
4) in the firebasetest.php
// — Set up your Firebase url structure here
$firebasePath = ‘/temperature/’;
how can i set up my firebase url structure
Hi,
Please find my answers. Both my hosting site and Firebase has changed drastically after this is published so unfortunately I don’t have a favorable answer at this time. I will get back soon when I have time to re-write this to compatible with new firebase format. Please find my detailed answers to your questions.
Cheers!
1) http://myawesomearduio.netau.net/ is this your web address or domain? e.g my website is
http://enggeedi.000webhostapp.com/ and domain is enggeeddi@host22.com
A: No this is not my real address. My real address is http://dsignhome.netau.net. Unfortunately 000webhost.com has switched to a new location and my web address is not working anymore. I will try to fix this and get back to you
2) measure_temparature where this comes from is it your fire-base database or not?
A: measure_temparature is sub directory
3) when i uploading the php file to the hosting which folder do i have put it?
A: \measure_temparature\firebaseTest.php
4) in the firebasetest.php
// — Set up your Firebase url structure here
$firebasePath = ‘/temperature/’;
how can i set up my firebase url structure
A: This is the location of the firebase where data is stored. Unfortunately firebase also upgraded their access information and I didn’t have time to verify this recently. I will get back when I setup with new firebase format
Hi,
My website is up and running and you can play with it in following way
* URL to call from arduino:
http://dsign-home.000webhostapp.com/measure_temprature/firebaseTest.php?arduino_data=31.6
dashboard URL:
http://dsign-home.000webhostapp.com/measure_temprature/
Please buzz me if you have any problems accessing or setting up your project. I will loved to help 🙂
Hi friend…Now I am doing on this similar project. But I am very beginner of this…so I don’t know what is the step should I start…so Could you please guide me some…? Thank.
Hi,
If you give more information on your project and where you are right now I’ll try to help as best as I can 🙂
Hi,
Yes, i know it but i can’t push it to firebase.
Sorry Faut. I misunderstood your question. What I did was simply stored the date in string format in Firebase.
Thanks for your all answers. Cheers!
Thanks. I have another problem 🙂 I wanna write to database with date and time. I don’t know php and i tried something but it didn’t work. Do you know that how i can fix it?
Cheers.
Hi Faut,
It depends on how the date time conversion is handled in the database
You may use following example to add registered date.
// Change the line below to your timezone!
//http://php.net/manual/en/timezones.php
date_default_timezone_set(‘Asia/Colombo’);
$curr_date = date(“Y-m-d”);
$curr_time = date(“H:i:s”);
$reg_time = {$curr_date}T{$curr_time}
// eg: reg_time = 2017-05-22T16:11:45
Hi, this is a great tutorial. I’m triying myself but i have a problem in chartJs. My chart is writing last data continiusly. It shouldn’t be if there is no any new data in my firebase. How can i fix it?
Hi Fuat,
Please have a look at my example code (https://github.com/damithsj/arduinoFirebaseWiFi/blob/master/php_site/index.html)
As I can remember it worked fine without continuously updating.
Cheers!