Original Question: How to decode Temperature and humidity value from Bunch sensor board that is seen at AnodeCP GUI? by samanwaya
How to decode Temperature and humidity value from Bunch sensor board that is seen at AnodeCP GUI?
for eg: Temp data(4 bytes) : B3 87 BB 41 . How does it correspond to a temperature in C or F?
Humidity data(4 bytes) : A8 C2 90 42 . How does it correspond to a %RH?
Similarily for XL362 , how to decode bytes into meaningful x,y,z co-ordinates?
Verified Answer: RE: How to decode Temperature and humidity value from Bunch sensor board that is seen at AnodeCP GUI? by schennu
Hi Samanwaya, These float values formatted in IEEE754 format and are stored in little endian.
So, the Temp data is actually 41 BB 87 B3 in hex. This is equivalent to 23.44 deg.C
Use this calculator for reference.
We have provided an API convertieee754() in file ADSensors/src/convert.c file. You can use this to convert this hex value to actual sensor data.
Hope this helps.
Question: RE: How to decode Temperature and humidity value from Bunch sensor board that is seen at AnodeCP GUI? by samanwaya
Thanks for the help!! I have another question for you if you don't mind. I saw a document posted by you back in 2015 explaining how to create an alternative solution in AnodeCenterPoint tool to receive data from CP device.
I am trying to create that so that i can access raw data in another application. I am using MATLAB/Python to get raw data from CP over a serial connection currently. But i have to use the AnodeCP tool to setup the CP device and get it to transmit data continuously. In order to bypass that process, i have to send out 4 commands
This command (UART_SUBCMD_CHECKDEVICE) is to find the devices connected to PC.
Command from PC application
4A 43 06 4B 0C 8B
Response from CP device
4A 43 0B 4B 07 20 06 01 03 11 F6
Is it as simple as sending the bytes 4A 43 06 4B 0C 8B and waiting for the CP to respond back? Please advice. If you have any example code snippets that would be useful as well.
Thanks for responding.
Question: RE: How to decode Temperature and humidity value from Bunch sensor board that is seen at AnodeCP GUI? by MReddy
The commands/packets you have mentioned can be sent as it is and wait for the response from the CP, except the UART_SUBCMD_ADDRESMESG. You can use the serial tools which can send the data in HEX format over UART(Ex: Docklight) to check the response from the CP.
In the case of UART_SUBCMD_ADDRESMESG, after UART_SUBCMD_AUTOSEND command the tool/ (PC application) is ready to receive any registration request from the devices (Nodes). The tool sends the response using UART_SUBCMD_ADDRESMESG command for every registration request it receives from the devices. The registration response from the PC tool contains the time stamp, device ID and CRC as explained in the section 4 of the “Procedure to implement alternative application to CP tool” document, which need to be calculated by user if they want to send the response back using terminal/application.