Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

nmac on Convert counter values to rate

$
0
0

Thank you for help.

I've find that i want :

% Time (month, day, hour ....) Here counter value in one hour
t1 = datetime('now') - hours(1);
t2 = datetime('now');
[b,time,channelInfo] = thingSpeakRead(202xxx,'Fields',[4],'DateRange',[datetime(t1),datetime(t2)], 'ReadKey','1F16B5PPxxxxxxx');
% Take first & end value
a = b (1);
c = b (end);

% Différence between end 1 first value
d = c-a;

Have a good year 2017 !


Viewing all articles
Browse latest Browse all 1833

Trending Articles