3 Replies Latest reply on Apr 29, 2015 10:19 AM by Intel_Peter

    How to send Galileo Gen 2 data to Google spreadsheet?

    Swamy_Govinda

      Hi everyone,

      In my project I have taken Temperature sensor readings from the Galileo Gen 2 using Arduino IDE.

      After that i need to send these sensor readings to Google spreadsheet.

      I followed the all the steps in this link http://www.instructables.com/id/Post-to-Google-Docs-with-Arduino/?ALLSTEPS

      In this procedure pushingbox API is receiving the readings which i sent from the Arduino IDE script,

      but Google spreadsheet is not receiving my data..

      or

      can anyone tell me how to do this?

       

      If you any procedure other than this to send data to Google Spreadsheet using Arduino IDE pls suggest me ?

        • 1. Re: How to send Galileo Gen 2 data to Google spreadsheet?
          Intel_Peter

          Hello Swamy_Govinda,

           

          I just tested the guide you posted with a Galileo and an Arduino Uno and I couldn't make it work with neither; the sketch wouldn't connect to the Pushingbox server. Have you already tried it? Did it work for you using an Arduino?

           

          Peter.

          • 2. Re: How to send Galileo Gen 2 data to Google spreadsheet?
            Swamy_Govinda

            Hello Intel_Peter,

            I used Intel Galileo Gen 2 board with Arduino IDE script.

            Are you running this sketch on the board connected to Intel Network ?

            If so you need to add the proxy also..

            otherwise it will not connect.

             

            I already told that i was able to send data to pushingbox server, but unable to get data in the Google Spreadsheet..

            That script .ino file am posting here.

            You try with this, it definitely work for you.



            #include <Ethernet.h>

             

            byte mac[] = {0x98,0x4F,0xEE,0x01,0xED,0xB5};  //Replace with your Ethernet shield MAC

            byte ip[] = {10,223,109,129};     // Your Arduino device IP address

             

            char devid[] = "vB269FD2E912F97E" ;  // THIS IS THE DEVICE ID FROM PUSHINGBOX

            int del=300;  // Amount of seconds delay between posting to google docs.

            char postmsg[100];

            char server[] = "api.pushingbox.com";

            EthernetClient client;

             

             

            void setup()

            {

              Serial.begin(9600);

              Ethernet.begin(mac, ip);

              delay(1000);

              Serial.println("connecting...");

            }

             

            void loop(){

             

              int avtemp = analogRead(A0);

              int volt = 65; //dummy data

             

             

               // Post to Google Form.............................................

              if (client.connect("proxy.jf.intel.com", 911)) ////HERE YOU NEED TO ADD PROXY

              {

                client.connect("server", 80);   //////

                Serial.println("connected");

                sprintf(postmsg,"GET /api.pushingbox.com/pushingbox?devid=%s&Temperature=%d&VoltaGE=%d HTTP/1.1",devid,avtemp,volt);  / * NOTE** In this line of code you can see where the       temperature value is inserted into the wed address. It follows 'status=' Change that value to whatever you want to post. */

                client.println(postmsg);

                client.println("Host: api.pushingbox.com");

                client.println("Connection: close");

                client.println();

             

             

                Serial.println(postmsg);

                Serial.println("Host: api.pushingbox.com");

                Serial.println("Connection: close");

                Serial.println();

             

                 delay(1000);

                 client.stop();

              }

              delay(1000);

             

              if (!client.connected())

              {

                Serial.println();

                Serial.println("disconnecting.");

                client.stop();

               

              }

             

             

            }

            • 3. Re: How to send Galileo Gen 2 data to Google spreadsheet?
              Intel_Peter

              Hello Swamy_Govinda,

               

              Sorry for the delay in my response. I've been running some additional tests with my Galileo. I found out that I was able to send data to Pushingbox, however pushing box did not send the data to the Google spreadsheet. So the issue seems to come not from the Galileo but from Pushingbox.

              I'd suggest you to check this code format. Also what could be happening, as you said, is that the proxy might be blocking the connection.

               

              Peter.