Sensors (ESP32)¶
Blocks in toolbox order:
- DHT11/DHT22 (AM2302) — initialization
- DHT11/DHT22 — load new sample
- DHT11/DHT22 — temperature [°C]
- DHT11/DHT22 — relative humidity [%RH]
- HC-SR04 — initialization
- HC-SR04 — distance [mm]
- HC-SR04 — distance [cm]
- Joystick (2 axis + button) — initialization
- Joystick — X/Y axis [-100..100]
- Joystick — direction / push (boolean)
- Rotary Encoder — Initialization
- Rotary encoder — current position
- Rotary encoder — set position
- TCS34725 — color sensor initialization
- TCS34725 — is color detected?
- TCS34725 — R/G/B folder value
- MPU6050 (IMU) — initialization
- MPU6050 (IMU) — offset calibration
- MPU6050 (IMU) — update data
- MPU6050 — X/Y/Z axis angle
- MPU6050 — X/Y/Z axis acceleration
- MPU6050 — X/Y/Z axis angular velocity
- MPU6050 — chip temperature
- VL53L0X — ToF rangefinder initialization
- VL53L0X — fast distance [mm] (non-blocking)
- VL53L0X — fast distance [cm] (non-blocking)
- VL53L0X — distance [mm] (blocking)
- VL53L0X — distance [cm] (blocking)
Other pickups and boards¶
- MPU6500 — initialization, calibration, operation and measured quantities
- Built-in BME280 and BMI270 ESP:BIT boards
Practical principles¶
- Always initialize the sensors first and monitor the sequence of blocks (init -> measurement -> reading).
- For sensors with a slower response (DHT), observe the minimum reading period, otherwise you will get old or error data.
- For I2C sensors, use the correct SDA/SCL pins, common ground and reasonable wire length.
- Validate all measured quantities (limits, step changes, fallback values) and filter as needed.