I'm just getting started working with RFDuino and was trying to send the temperature to my android device's android test app via BLE. I read the previous post about temperature conversion, and would like a little more elaboration as I can't seem to get accurate readings.
I am working in room temperature (~70 degrees F). When I program the RFDuino to send a float with the temperature in Celsius, I receive a "00 00 FFFFFFF4 41", which yields 244 / 8 = 30.5 C - it seems extremely warm.
float tempC = RFduino_temperature(CELSIUS);
When I set a float with the temperature in Fahrenheit and send over BLE, my received output on the Android test app alternates between the two of these "FFFFFFCD FFFFFFCC FFFFFFAD 42" and "FFFFFFCD 4C FFFFFFA9 42" which respectively gives 173/8 = 21.625, and 169/8 = 21.125 F
float temp = RFduino_temperature(FAHRENHEIT);
These last two (Fahrenheit) values are what I had expected to see in the Celsius measurements, but I am not sure. Either way I don't understand the conversion convention and where the temperature data is within the received packets. I have proceeded to serial print the temperatures before I send them - it reads ~30.5 C and ~87 F, which seems reasonable for a chip's temperature in a room temperature of ~70F. What I don't seem to understand is how to read the Fahrenheit values apparently on the receiving/Android end.
Any more elaboration would be great!