Commit e7553d2c authored by a-j.towse's avatar a-j.towse

Add new file

parent 3904e43f
readChannelID = 2394292;
TemperatureFieldID = 1;
readAPIKey = 'WOX3EPH2YUWISIC2';
[tempF,timeStamp] = thingSpeakRead(readChannelID,'Fields',TemperatureFieldID, ...
'numDays',1,'ReadKey',readAPIKey);
[maxTempF,maxTempIndex] = max(tempF);
[minTempF,minTempIndex] = min(tempF);
timeMaxTemp = timeStamp(maxTempIndex);
timeMinTemp = timeStamp(minTempIndex);
display(maxTempF,'Maximum Temperature for the past 24 hours is');
display(minTempF,'Minimum Temperature for the past 24 hours is');
pause(10)
writeChannelID = 2394292;
writeAPIKey = '4AX6F1QBBZK9XIK7';
thingSpeakWrite(readChannelID,[minTempF,maxTempF],'WriteKey',writeAPIKey,'Fields',[2,3]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment