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?
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
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.
Most Users Ever Online: 114
Currently Browsing this Page:
Guest Posters: 1
Administrators: Hans, lee