What is wrong with this code?
Mostrar comentarios más antiguos
I want to send acceleration data from a mobile phone sensor to ThingSpeak. Error: URL is incorrectly formed, or the requested feature is not supported in this version of ThingSpeak.
[acc, tacc] = accellog(m);
xAcc = acc(:,1);
yAcc = acc(:,2);
zAcc = acc(:,3);
InitialTime = datetime(m.InitialTimestamp,'InputFormat','dd-MMM-yyyy HH:mm:ss.SSS');
AccelTime = InitialTime + seconds(tacc);
channelID = XXXXX;
writeKey = XXXXXXXXXX;
tStamps = AccelTime;
data=[xAcc,yAcc,zAcc];
thingSpeakWrite(channelID,data,'TimeStamp',tStamps,'WriteKey',writeKey)
2 comentarios
Vinod
el 5 de Nov. de 2021
What version of MATLAB are you using?
sicajios dsgvbdgs
el 5 de Nov. de 2021
Respuestas (1)
Vinod
el 6 de Nov. de 2021
0 votos
Thingspeak can only accept data sampled at 1hz or lower frequency. That is, tStamps should be at least 1s apart. My initial guess is that your accelerometer data is sampled at a much higher rate.
8 comentarios
sicajios dsgvbdgs
el 6 de Nov. de 2021
sicajios dsgvbdgs
el 6 de Nov. de 2021
Christopher Stapels
el 9 de Nov. de 2021
Perhaps consider using retime:
newData=retime(myData,'secondly','mean');
sicajios dsgvbdgs
el 10 de Nov. de 2021
sicajios dsgvbdgs
el 11 de Nov. de 2021
Vinod
el 11 de Nov. de 2021
"Real time" means different things for different people. An RF engineer who is measuring phenomena in the Ghz or Thz range has a very different defintion of real time than does an engineer measuring heat transfer across a large body with high thermal capacity.
What is the timescale of the phenomena you are measuring? If you are looking to store raw accelerometer data at over 1Hz, you might be better served by something like the Arduino IO support package. If you are looking to do some feature detection on the edge node based on accelerometer data and send the feature changes to the cloud, when the rate of change of the features are at a longer timescale, ThingSpeak can meet your needs.
If you give more detail of your project someone can guide you towards the right solution.
sicajios dsgvbdgs
el 12 de Nov. de 2021
Vinod
el 12 de Nov. de 2021
That is possible.
If you have an unstable or slow internet connection, it might be that the data you send from your device does not reach the servers exactly 1s apart. You might want to add a 5-10% buffer to factor in network latencies.
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Categorías
Más información sobre ThingSpeak en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!