January 4, 2018
Hi, i would like to ask for help.
I am sending value to thingspeek periodically (lets say every 5 minute) where the original message is number. But the transmission changes the string(number value) into hex format, so instead of 40 i do receive 3430, after 5 minutes instead of value lets say 45 i receive 3435 and so on. I want to plot original values. I started with analysis tool writing code below, but i need help with function for changing hexadeciaml value back into original value.
readChannelID = xxxxx;
readAPIKey = 'xxxxxx;
writeChannelID = xxxxxx;
writeAPIKey = 'xxxxxx;
data = thingSpeakRead(readChannelID, 'ReadKey', readAPIKey,'OutputFormat','table');
analyzedData = data;
analyzedData.('Counter') = data.('Counter');
thingSpeakWrite(writeChannelID, analyzedData, 'WriteKey', writeAPIKey);
March 7, 2017
value = '3435';
notice that value has to be a character vector.
If you can keep the device or program that is posting from converting to hex, ThingSpeak will definitely accept field values as string. However, adding a string manipulation class your code may not be easy if you are using a limited hardware.
Most Users Ever Online: 166
Currently Browsing this Page:
Guest Posters: 1
Newest Members:Hema, askask, Rakwireless, budiardi basuki, oliver009, shelby1234
Moderators: cstapels: 460
Administrators: Hans: 405, lee: 457