Bulk update with thingSpeakWrite to a specified field
4 次查看(过去 30 天)
显示 更早的评论
In the thingSpeakWrite documentation is an example, how to upload a table of data
....
thingSpeakWrite(writeChannelID,dataTable,'WriteKey',writeAPIKey);
This works, but the data are uploaded in Field1. How can i specifie the field - for example field 5?
thingSpeakWrite(writeChannelID,'Fields',[5],dataTable,'WriteKey',writeAPIKey);
or
thingSpeakWrite(writeChannelID,'Fields',[5],'Values',dataTable,'WriteKey',writeAPIKey);
did not work.
0 个评论
采纳的回答
Christopher Stapels
2023-5-4
编辑:Christopher Stapels
2023-5-4
myDates=datetime(2023,1,1):days(1):datetime(2023,1,10)
nullVec=string.empty(10,0);
myNums=1:10;
myTimeTable=table(myDates',nullVec,nullVec,nullVec,nullVec,myNums')
thingSpeakWrite(nnnnnnnnn,myTimeTable,'writeKey','xxxxxxxxxxxxxxxx')
更多回答(1 个)
社区
更多回答在 ThingSpeak Community
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!