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);
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: 114
Currently Browsing this Page:
Guest Posters: 1
Administrators: Hans, lee