12:28 pm
September 8, 2016

This is really a 2 part question:
1. How do you average data from 3 fields that I've read in using thingSpeakRead? This is data taken from 3 different temperature sensors that I want to average across the 3 sensors and have this be done for each time that the samples are taken. In other words, I want to calculate and display one temp-time graph out of 3.
2. How do you automatically trigger a refresh based on data that is being updated/sent to ThingSpeak?
9:53 pm
August 31, 2015

Here is the basic outline. Create a MATLAB analysis that does something like this:
______________
Temp1 = thingSpeakRead ...
Temp2 = thingSpeakRead ...
Temp3 = thingSpeakRead ...
allTemp = [Temp1,Temp2,Temp3];
meanTemp = mean(allTemp);
chID = xxxxx; % Your channel ID for the mean temp
% Write the mean to a new channel
thingSpeakWrite(chId,meanTemp);
_______________
To "automatically trigger a refresh based on data that is being updated/sent to ThingSpeak" use the React App to run your MATLAB analysis on insert of your data (assuming you can reliably use one of you three temp readings to trigger with the other two already updated). If React timing is an issue then try the TimeControl App.
8:45 am


MathWorks
August 22, 2015

Senior Development Manager for IoT and Hardware Interfacing for MATLAB at MathWorks. Visit ThingSpeak.com to explore the IoT Analytic platform that speaks MATLAB made for engineers and scientists. You can collect, analyze, and act in 5 minutes or less!
Most Users Ever Online: 166
Currently Online:
25 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
rw950431: 272
Vinod: 240
piajola: 95
turgo: 70
vespapierre: 63
Adarsh_Murthy: 62
Member Stats:
Guest Posters: 1
Members: 8665
Moderators: 1
Admins: 2
Forum Stats:
Groups: 3
Forums: 14
Topics: 1600
Posts: 5760
Newest Members:
kusmumichael, petersmith99, Rambant, blakeharriss09, optisol, Niyonzima FilsModerators: cstapels: 460
Administrators: Hans: 405, lee: 457