Use PostText not PatchText
and the error message was ?
Did you update your apps script as I advised (and create new version)
Use PostText not PatchText
and the error message was ?
Did you update your apps script as I advised (and create new version)
However this gives me error message. I have been try to resolve it but not successful. I did create a new version for the script code too.
so what is the error ?
get the value of responseContent
Show what is coming back in global Receive_data, then we can fix it.
It is still the same error message.
global Receive_data
Not correct Anthony - compare the Bluetooth part to my example. Get the IF's right too or your App will keep crashing.
The WEB1 code does not look like TimAI2's either.......
Use the | delimiter in your Sketch and in the Project. Note that, in the example Project, App Inventor is"told" what to expect from Bluetooth on Screen Initialize. I think you may be better off modifying my example to suit your display and Google Sheet requirements as there are many little things that add up to robustness.
I have used your code blocks and made some changes, but i cannot send sensor data to google sheet. I still need assistance to solve my issues.
If you want to test your google apps script try this:
if you get the data in your google sheet, then at least you know that part works, and you can focus on correctly getting the data from your arduino
If it doesn't work we can have a look at that too (e.g. provide full error messages / responseContnet)
therefore, as requested, provide the error messages returned. You will either get app notifications, or a message in your responseContent, or both!
There appear to be a couple of errors in your blocks:
&
before Voltage - I am sorry I left this out of my blocks too There actually no error message. Just that nothing saves on the google sheet.
You may not be using Web1.GotText. Add these blocks to your project, and then try to send the data to your google sheet again. What do you see in Label1.Text
I also note that your google apps script does not have a return element, this is usually required. You could, as previously suggested, edit your script to this:
function doPost(e) {
var ss = SpreadsheetApp.openByUrl("YOUR_SHEET_URL");
var sh = ss.getSheetByName("Sheet1");
var Sensor = e.parameter.Sensor;
var Voltage = e.parameter.Voltage;
sh.appendRow([Sensor,Voltage]);
return ContentService.createTextOutput('data appended');
}