Chris Collins

Tools · embedded

Sensor register decoder

Turn raw I2C register bytes from BME280/BMP280, MPU-6050, INA219, ADS1115, SHT3x, DS3231, and DS18B20 into calibrated readings using the datasheet formulas, and build the configuration registers and I2C transactions to set them up.

Added

How to use it

Decoding readings

Each tab takes the bytes you read from the device — paste them as hex from a logic analyser, a serial dump, or Serial.printf("%02X ") — and applies the compensation in the datasheet:

  • BME280 / BMP280: paste the 26 calibration bytes from 0x88 (and, for the BME280, the seven humidity bytes from 0xE1) and the burst read from 0xF7. You get temperature, pressure, humidity, and altitude from both the floating-point and the integer reference code, plus the decoded dig_* coefficients. The sample is the datasheet’s worked example.

  • MPU-6050: the 14 bytes from 0x3B with the accelerometer and gyro ranges give g, °/s, die temperature, and tilt.

  • INA219: enter the shunt and the largest current to get Current_LSB and the calibration register, then decode the shunt, bus, current, and power registers and the config word.

  • ADS1115 / ADS1015: decodes the config register bit by bit and turns a conversion into volts.

  • SHT3x: temperature, humidity, dew point, and CRC checks; a Sensirion CRC-8 calculator.

  • DS3231: BCD time (12- or 24-hour), temperature, control and status flags including the oscillator-stop flag; builds the bytes to set the clock.

  • DS18B20: scratchpad temperature at any resolution, alarms, and the 1-Wire CRC.

Configuration

Below each decoder is a builder: pick oversampling, filter, ranges, data rate, or mode and it shows the register values and the list of I2C transactions (S 0x76 W F4 57) to send, in the order the datasheet requires.

Sharing

Share link copies a URL that opens this tool with your current settings — every value it remembers between visits, packed into ?s=. Opening a link replaces your saved settings for this tool.

Runs entirely in your browser; nothing you type leaves this page.