For better than 1% accuracy, read a separate temp sensor (e.g., DS18B20) and compute:
| Pin | Name | Function | |-----|------|-----------| | 1 | VCC | +5V DC (regulated) | | 2 | Trig | Trigger input (active high, 10 µs min pulse) | | 3 | Echo | Echo output (PWM width = time of flight) | | 4 | GND | Ground | aj sr04m datasheet
1. Overview & Key Differentiators The AJ-SR04M is an improved, industrial-grade variant of the popular HC-SR04. Unlike the standard HC-SR04, this module is enclosed in a waterproof, IP67-rated housing , making it suitable for outdoor, dusty, or humid environments (e.g., tank level sensing, outdoor robotics, car reverse sensors). For better than 1% accuracy, read a separate temp sensor (e
delay(60);