Grove-Ultrasonic Ranger (Ultrasonic Ranger)

Grove-Ultrasonic Ranger is a non-contact ranging module with a working frequency of 40KHz. The trigger and echo signals of Grove_Ultrasonic_Ranger share a SIG pin.


Item Value
Working voltage 3.2~5.2V
Working current 8ma
Ultrasonic frequency 40kHz
Measuring range 2-350cm
Resolution 1cm
Output PWM
Size 50mm x 25mm x 16mm
Weight 13g
Measurement angle 15°
Working temperature -10~60°C
Trigger signal 10uS TTL
Echo signal TTL


MaixPy has implemented ultrasonic driver in the modules module.

  • Import ultrasonic class and create object
from modules import ultrasonic
device = ultrasonic(fm.fpioa.GPIOHS0)
  • Get the current measurement distance (cm)
distance = device.measure(unit = ultrasonic.UNIT_CM, timeout = 3000000)


Grove-Ultrasonic Ranger example