I need to know how to convert Estimote beacon temp sensor output to degC when not using Estimote SDK but standard Android library…? Just the mathematical conversion will do … Thank you again.
Check out the example from the Eddystone repo:
Specifically, the code to convert the temperature data to a regular float is here:
beacon.tlmStatus.version = String.format("0x%02X", version);
if (version != EXPECTED_VERSION) {
String err = String.format("Bad TLM version, expected 0x%02X, got %02X",
EXPECTED_VERSION, version);
beacon.tlmStatus.errVersion = err;
logDeviceError(deviceAddress, err);
}
// Battery voltage should be sane. Zero is fine if the device is externally powered, but
// it shouldn't be negative or unreasonably high.
short voltage = buf.getShort();
beacon.tlmStatus.voltage = String.valueOf(voltage);
if (voltage != 0 && (voltage < MIN_EXPECTED_VOLTAGE || voltage > MAX_EXPECTED_VOLTAGE)) {
String err = String.format("Expected TLM voltage to be between %d and %d, got %d",
MIN_EXPECTED_VOLTAGE, MAX_EXPECTED_VOLTAGE, voltage);
beacon.tlmStatus.errVoltage = err;
logDeviceError(deviceAddress, err);
}
// Temp varies a lot with the hardware and the margins appear to be very wide. USB beacons
// in particular can report quite high temps. Let's at least check they're partially sane.