Im trying to get around the 15 sec update limit by having 3 channels that update depending on a few counters on the arduino.
I was hoping the next part would be easy, but it isn't.
The data I am sending to each channel is very basic. Its a door bell counter, so its either 0 or 1.
If the bell is pressed a few times within 15 seconds, then it will send the three 1's to different channels. The rest of the presses are disregarded.
I would like to show the combined presses with a 30sec timescale on another channel as a vertical line graph.
Can anyone help?
This is what I have so far:
readChannelID1 = XXXXXX; readChannelID2 = XXXXXX; readChannelID3 = XXXXXX; readAPIKey1 = 'XXXXXXXXXXXXXXXXX'; readAPIKey2 = 'XXXXXXXXXXXXXXXXX'; readAPIKey3 = 'XXXXXXXXXXXXXXXXX'; chan1 = thingSpeakRead(readChannelID1, 'Fields', 1, 'ReadKey', readAPIKey1, 'NumDays',2); chan2 = thingSpeakRead(readChannelID2, 'Fields', 1, 'ReadKey', readAPIKey2, 'NumDays',2); chan3 = thingSpeakRead(readChannelID3, 'Fields', 1, 'ReadKey', readAPIKey3, 'NumDays',2); thingSpeakPlot(chan1, chan2, chan3);
Suspect you need to read the timestamps as well as the data from the 3 channels . I dont know enough Matlab to show exactly how to do this maybe this will work, maybe not
[data1,time1] = thingSpeakRead(..)
[data2,time2] = thingSpeakRead(..)
[data3,time3] = thingSpeakRead(..) plot(time1,data1,time2,data2,time3,data3)
This is creating the error
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Will keep searching Google.
Guessing that its complaining because the arrays have different numbers of data points.. Does it work if you only plot one series at a time?
You may end having to figure out how to merge the 3 datasets together before plotting- please show me how to do it when you figure it out..
Most Users Ever Online: 114
Currently Online: cstapels
Currently Browsing this Page:
Guest Posters: 1
Administrators: Hans, lee