Sending a .txt file to online storage or e-mail via wifi

I have a sketch that collects data from several sensors and records in in a .txt file on an SD card. What I would like to do is send that file over wifi either to online storage (e.g., Google Drive, Amazon S3) or send it by e-mail. The idea is, periodically (if I do it every 24 hrs, the file size will be about 3MB) the sketch will pause data collection, connect to the wifi to send the file, then erase the file from the SD card to make room for new data. I can find plenty of tutorials on how to send data directly from a sensor to a web server, but that won't work for my project because it won't always be connected to the wifi. I'm also hoping to save battery life by not having it always connected to the wifi. Can somebody point me in the right direction? I'm still fairly new at this, so if there is a tutorial or something, that would be incredibly helpful. I have included a list of the hardware I'm using below, in case that helps. Thank you!


  • Arduino Uno
  • ESP8266
  • SD breakout board
  • RTC
  • accelerometer

What service do you have running on the other side? accesing google drive is not an easy task you need to interface with the OAuth protocol

as an alternative you might want to upload to a google docs spreadsheet or Have a look at FTP for arduino for example?

I currently have Google Drive, Dropbox, and Amazon S3 that I can use. If something else would be better, I'll use that so long as it's not pricey. I'm going to need to do some editing on the file before I put it into my database anyway, so I just need the file to send to something I can access from my computer.