P Philip Prins Active Member Licensed User Longtime User Apr 26, 2017 #1 Hello , I get a HEX value that is a temperature reading 16 Hex is 22 degrees. But when the temperature = -15 the HEX value is F0 How can i convert this HEX value to -15? Tnx in advance Philip
Hello , I get a HEX value that is a temperature reading 16 Hex is 22 degrees. But when the temperature = -15 the HEX value is F0 How can i convert this HEX value to -15? Tnx in advance Philip
stevel05 Expert Licensed User Longtime User Apr 26, 2017 #2 Assign the value to a byte first, although F0 should be -16. B4X: Dim H As String = "F0" Dim b As Byte = Bit.ParseInt(H,16) Log(b) Upvote 0
Assign the value to a byte first, although F0 should be -16. B4X: Dim H As String = "F0" Dim b As Byte = Bit.ParseInt(H,16) Log(b)
Erel B4X founder Staff member Licensed User Longtime User Apr 26, 2017 #3 What do you mean with hex value? Is it sent as a string? Why not send it as a byte? Upvote 0
P Philip Prins Active Member Licensed User Longtime User Apr 26, 2017 #4 Erel said: What do you mean with hex value? Is it sent as a string? Why not send it as a byte? Click to expand... Hello Erel, It comes from the SIGFOX network, it is sent by their backend as a 12 byte packet in HEX. https://www.arduino.cc/en/Guide/MKRFox1200 Upvote 0
Erel said: What do you mean with hex value? Is it sent as a string? Why not send it as a byte? Click to expand... Hello Erel, It comes from the SIGFOX network, it is sent by their backend as a 12 byte packet in HEX. https://www.arduino.cc/en/Guide/MKRFox1200