Expand description
DS18B20 1-Wire digital temperature sensor driver via RMT peripheral.
Broadcasts a single Convert T to all sensors, waits for the conversion to complete, then uses the ROM Search algorithm to enumerate every sensor and reads each device’s full 9-byte scratchpad (validating its CRC-8). The temperature (bytes 0..1) is returned as signed 12.4 fixed-point (0.0625 °C resolution).
1-Wire commands used: 0xCC Skip ROM — address all devices 0x44 Convert T — start temperature conversion (750 ms max at 12-bit) 0x55 Match ROM — address specific device 0xBE Read Scratchpad — returns 9 bytes (TEMP_LSB, TEMP_MSB, …, CRC)
RMT channel assignment (chip-specific): ESP32 (fire27): TX=channel0, RX=channel2 ESP32-S3 (cores3): TX=channel0, RX=channel4
Wiring (M5Stack Grove): the 1-Wire data line goes on Port B (black) — the signal pin that follows VCC, i.e. G26 on Fire27 and G9 on CoreS3. An external 4.7 kΩ pull-up from data to 3V3 is required. (Port A / red is the I2C port and is not used here.)
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/DS18B20.pdf