HOBO pH and Temperature Data Logger
Read 16-bit Little Endian Values
Sensor values are stored as 16-bit integers (LE) at fixed offsets.
From the packet:
Temperature raw: bytes [10..11]
mV raw: bytes [12..13]
Calibration Formulas:
// Temperature (°C)
const float T = -0.02541008336f * (float)ch0_le + 77.36404759f;
// mV
const float mV = 0.0156205128837f * (float)ch1_le - 511.890058384f;
// pH
const float pH = -0.0002918575538f * (float)ch1_le + 16.3797874314f;
``
These coefficients come from calibration experiments.
Battery Level:
Battery info is stored in byte [18]. Convert to bars and percentage:
const uint8_t b18 = d[18];
int bars = 0;
if (b18 >= 216) bars = 6;
else if (b18 >= 212) bars = 5;
else if (b18 >= 191) bars = 4;
else if (b18 >= 168) bars = 3;
else if (b18 >= 134) bars = 2;
else if (b18 >= 112) bars = 1;
else bars = 0;
Summary of Offsets:
FieldOffset (bytes)Format
Temp raw[10..11]LE uint16
mV raw[12..13]LE uint16
Battery[18]uint8
Packets and→ sensor values from app
| hex | ph | temp C | rms mV | battery level |
|---|---|---|---|---|
| c5000b2072560100250000329f08165387732241dc | 10.15 | 21.17 | -179.6 | 6 |
| c5000b207256010025000032a608df629caa0f41db | 8.98 | 20.98 | -116.52 | 6 |
| c5000b207256010025000032a70879656e910c41dc | 8.79 | 20.96 | -106.11 | 6 |
| c5000b207256010025000032a9088469c2c00741db | 8.48 | 20.91 | -89.94 | 6 |
| c5000b207256010025020032a908856dd1fa0241dc | 8.19 | 20.91 | -73.92 | 6 |
| c5000b207256010025000032ae08ff7a80d4e540dc | 7.18 | 20.79 | -20.02 | 6 |
| c5000b207256010025020032b2082772ebeefa40dc | 7.84 | 20.7 | -55.39 | 6 |
| c5000b207256010025020032b3081f729202fb40dc | 7.84 | 20.67 | -55.52 | 6 |
| c5000b207256010025000032b408817358b6f740dc | 7.74 | 20.65 | -49.99 | 6 |
| c5000b207256010025020032b40879a35b3d8540dc | 4.16 | 20.65 | 141.89 | 6 |
| c5000b207256010025020032b208f5a342198440dc | 4.13 | 20.7 | 143.83 | 6 |
| c5000b207256010025000032b1082fa4c7908340dc | 4.11 | 20.72 | 144.74 | 6 |
| c5000b207256010025020032af0872a4cdf48240dc | 4.09 | 20.77 | 145.79 | 6 |
| c5000b207256010025000032b80863941439a940db | 5.6 | 17.82 | 64.05 | |
| c5000b2072560100250200322b090390fc3fb340dc | 5.6 | 16.18 | 63.46 | |
| c5000b2072560100250200327009dd8f055bb340dc | 5.66 | 15.06 | 60.08 | |
| c5000b2072560100250000329f09058f003cb540dc | 7.72 | 14.1 | 56.63 | |
| c5000b207256010025020032de09978d6581b840dc | 5.77 | 13.55 | 54.36 | |
| c5000b2072560100250000326e0a76883ab7c440dc | 6.15 | 10.05 | 33.84 | |
| c5000b207256010025000032070b787a2175e740dc | 7.23 | 6.23 | -22.13 | |
| c5000b2072560100250200323d0bd5786e9feb40dd | 7.36 | 4.84 | -28.67 | |
| c5000b2072560100250200325e0bee7714f1ed40dc | 7.44 | 3.98 | -32.28 | |
| c5000b207256010025020032850b0e773237f040dc | 7.51 | 2.96 | -35.78 | |
| c5000b2072560100250200329c0bc676b2f7f040dc | 7.54 | 2.13 | -37.2 | |
| c5000b207256010025020032b50ba276305ef140db | 7.54 | 1.59 | -37.56 | |
| c5000b207256010025000032bc0b9a76b075f140dc | 7.55 | 1.48 | -37.59 | |
| c5000b207256010025020032c20b9b76ca75f140dc | 7.55 | 1.32 | -37.58 | |
| c5000B207256010025000032E405216741110941DC | 8.57 | 38.87 | -99.49 | |
| c5000B2072560100250000325005E86791DD0741DC | 8.49 | 43.16 | -96.38 | |
| c5000B2072560100250000320C05D267C7CD0741DC | 8.49 | 45.25 | -96.72 | |
| c5000B2072560100250000320C05D267C7CD0741DC | 8.48 | 46.32 | -96.63 | |
| c5000B207256010025000032DC049768EDD80641DC | 8.43 | 46.77 | -93.86 | |
| c5000b207256010025020001fe0f017e34c0dd40da | 6 | |||
| c5000b207256010025020001fe0f1508ae17ad41ce | 4 | |||
| c5000b207256010025020001fe0f9b1a6c9c9a41af | 3 | |||
| c5000b207256010025040001fe0f4b1815eb9c419f | 2 | |||
| c5000b207256010025000001fe0f0000fe27b54193 | 2 | |||
| c5000b207256010025060001fe0f38001ff0b44179 | 1 | |||
| c5000b207256010025020001fe0fa10a288daa4166 | 0 | |||
| c5000b207256010025000001fe0f7b108cb6a441d6 | 5 |