Dart/Flutter: Converting BLE characteristic value to double

122 views Asked by At

I have been trying to process data received from a BLE A&D Medical Thermometer (UT-201BLE-A) (Service UUID 0x1809) in my Flutter app. The characteristic (UUID 0x2A1C, Temperature Measurement) value I retrieve is this array (-Uint8ListView);

[6, 112, 1, 0, 255, 229, 7, 2, 12, 10, 56, 34, 2]

with the 6 being a flag for the data being in Celcius, and I am only really interested in the following 112, 1, 0, 255, which corresponds to the temperature (36.8).

They are in IEEE 11073 32bit float format.

I have been trying to convert this Python code I found into Dart, but am not having much luck.

I would appreciate any suggestions that could point me in the right direction. So far what I have found regarding this deal with other programming languages I am not familiar with.

CLARIFICATION - Despite a similar question being asked here, it doesn't directly provide an answer to my problem, thus I asked a new question.

ANSWER - Kindly provided by M. Kotzjan in the comments.

0

There are 0 answers