I need to send data from MATLAB output to a field on ThingSpeak?
this is my current code…….
% Enter your MATLAB Code below
opts = weboptions('Timeout',15);data = webread('https://api.thingspeak.com/apps/thinghttp/send_request?api_key=PC4EOCTMNDPPQOSW',opts)writeChannelID = xxxxx;% TODO - Enter the Write API Key between the '' below:
writeKey = 'xxxxxxxxxx';thingSpeakWrite(writeChannelID, data, writeKey);
but it comes up with this in the output????
Lounge_Temp18Loft_Temp6Lounge_Humidity62Loft_Humidity88' must be a string scalar or character vector that can represent a field name.
Any ideas how to fix?
Best Answer