Project now uploads to Google Sheet monthly for a year!

CameraRainGauge.ino project updated 01/26/2023.

Added: Uploading data to Google Sheet by the month for a year. File in folder BME280 ChatGPT6 is copied into Google App script editor. Before pasting into editor; erase any existing code. Replace new sheet_id with sheet_id where Google App script was placed. For more detailed information see article:

"ESP32 Data Logging to Google Sheets with Google Scripts"
Author: IOTDesignPro

Project would have been impossible for me without the help of people from community; arduino.cc Forum, Adafruit.com Forum, ESP8266 Forum, Github.com, Random Nerd Tutorials Forum. Project started back in the Fall of 2013; with gifted "Arduino Uno." Thank you to all the people that have helped with the project!

Project served from ESP32 Project web site severed from ESP32.

Project web site served by Free Hosting Service

"CameraRainGauge.ino" was developed to provide a data logger accessible over the Internet, provide capability to manage files via file transfer protocol (FTP), over-the-air (OTA) firmware updates, two web sites, RTSP video feed, and uploading data to Google Sheets!

Live CameraRainGauge.ino data feed...

Heart of the project is task management; this is accomplished using network time protocol (NTP) servers to set ESP32 system time. UDP packets from the NTP server are decoded into MONTH,DATE, YEAR, HOUR, MINUTE, and SECOND. Conditional "if" statement "if((MINUTE % 15 == 0) && (SECOND==0))" are used to excute tasks at specified number of minutes and seconds; this statement evaluates "true" every fifthteen minutes and zero seconds. NTP is used to automatically configure time zone and daylight saving time., plus date-time stamps.

AsyncWebServer handles "GET" requests from the Internet and processing of web pages.

William

4 Likes

Thank you for sharing.

:+1:

1 Like

Added testForNextYear function to Google Sheet App script that collects data from the web server of the project. Script will keep creating Google Sheet for more than a year.

This is a Google Script that retrieves environmental data (datetime, temperature, heat index, humidity, dewpoint, pressure, and a difference value) from a web interface and appends it to a Google Spreadsheet. The sheet name is based on the current month and year, and a new sheet will be created with an additional number if the sheet with the same name already exists. If it's the last day of the current month, a new sheet for the next month will be created. The script has several functions, including getting the name of the current month, creating a new sheet with the specified name, adding headers to the new sheet, and appending the data to the sheet. Script is designed to create a new sheet at the end of each month with the name of the month and the year. Script creates a new sheet at the end of the year and continues logging.

Google Sheets App script created in parts by Google's, Bard. Additional code by William Lucid 07/02/2023

BME280Logging Google Sheet App Script

New Script: BME280 Logging live feed for latest deployment.

William

This is awesome, looks very useful!