Monitor infrared distance demo

async test.demo_infrared.test_ObserveInfraredDistance()[source]

Monitor infrared distance demo

Monitor infrared distance events, the robot reports the detected infrared distance to the nearest obstacle in front of you

When the returned infrared distance is less than 500, stop monitoring and broadcast “Detected infrared distance xxx” (xxx is the infrared distance value)