Basically, I made a weighing machine using m5stack that is connected to the internet. I am importing my live data to the Google spreadsheets but, I don't want that much data. I only want to display that live data in a single cell. (like a meter?)
I tried to write a code in an app script for the same but Find out difficult.
Here is my code for importing my data to the spreadsheets:
function doPost(e) {
// シート取得
var spreadsheet = SpreadsheetApp.openById("***"),
sheet = spreadsheet.getSheets()[0];
var postjsonString = e.postData.getDataAsString();
var postdata = JSON.parse(postjsonString);
date = new Date();
date_time = Utilities.formatDate(date, 'JST', 'yyyy年M月d日 H時m分s秒'),
sheet.appendRow([date_time,postdata.sensor.a]);
}
