So I'm trying to make use of my Arduino Uno while I purchase the components for my next project.

I've made use of the Digital Hourglass project from the Starter Kit to make sure I get up and move around every 20 minutes while I'm at home. A temperature sensor was included in the Starter Kit as well, so I figured I might as well make use of it since I have extra I/O pins.

I wrote the code for in the Arduino IDE to display the temperature and the current time. I'm using: #include (Time.h) to also show the current time. I have two questions.

End Goal:

A Google spreadsheet (Cloud) that I can access anywhere that can show me the temperature of my apartment throughout the day. I can track how the trend changes over time through the day, week, or month.

  1. What is the best way to output the current time; as seconds since 1970 (Unix time) or date and time format? I guess it's a preference.

  2. How do I output the data from the Arduino serial port directly to Google Sheets? That may be difficult, so the other option is to energize the Arduino in the morning and remove power at the end of the day, output the Serial port to a .txt file, and then import into Google sheets. How do I do this?


2 Answers 2

  1. Use Google's time stamp format: MM-dd-yyyy hh:mm:ss, see Google Sheets API v4 - Date and Number Formats.

  2. There are a few ways. For example:

    • A PC connected to the Internet with software on it that listens for data form the Arduino. It would get the Arduino data over serial then send that via the Internet to Google.

    • A Wi-Fi, or network, shield connected to the Internet. You could then use Google's API to send the data directly from the Arduino, see Google Sheets API v4 - Writing.

    • Or - as you mentioned - physically get the SD card and manually upload.

  • The first one is the idea. I'm leaving the Arduino connected to my laptop throughout the day while I'm gone. It shouldn't be that hard to edit the script to at least send that data from being transmitted from the Arduino to a .txt document. Maybe I haven't done enough digging into the Arduino Playground. This should be able to work with any analog sensor. Jun 28, 2017 at 21:11

I'd use an ESP8266 and IFTTT.

https://ifttt.com/maker_webhooks https://ifttt.com/google_drive

You could write something on your PC that took the serial output from the Aurdino and posts a REST message to IFTTT.

  • Yes, I recently ordered the Sparkfun Photon kit for a lot of IoT training. This project that I posted about in particular is not meant to be an IoT project. It's meant to learn how to simply document data for later processing using the serial connection. Thank you though! Jun 28, 2017 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.