🛠 ADC 12 bits et capteur de température : piège du date code
The ESP32-H2 integrates a 12-bit SAR ADC with up to 5 channels, a temperature sensor, and an analog voltage comparator (PAD) — but no DAC in its peripheral set. Tutorial: read the internal temperature sensor and an analog input, then display both on the USB-Serial/JTAG console (GPIO26/27; keep them reserved for debugging until your product is validated). A pitfall documented by Espressif: ADC accuracy and range depend on the manufacturing date — chips manufactured before and after date code D/C 342023 (shielded components) have different characteristics, and a mixed batch may behave strangely. Note your module’s part number and batch, then calibrate. Plan your pins from the schematic stage: only 19 GPIOs, 2 UARTs, and a single general-purpose SPI (the flash SPI ports on QFN32 packages with SiP flash are not exposed). Full exercise: every 10 s, read temperature + ADC, send a BLE 5 packet, then enter deep-sleep at 7 µA with timer wake-up — ensuring your wake-up pins are indeed in the LP domain.
Other tutorials for this board
- Premier blink sur une broche sûre (GPIO22)
- Pilotez la LED RGB embarquée avec le périphérique RMT
- Beacon BLE 5 : le « hello radio » d'une puce sans Wi-Fi
- Deep-sleep 7 µA : le bouton qui doit être dans le domaine LP
- Interrupteur Zigbee certifié avec l'ESP-Zigbee-SDK
- Endpoint Matter-over-Thread sur esp-matter