Update codes_for_scrimmage/hazmat/mainhazmatUPD.py

This commit is contained in:
2025-10-24 01:13:45 +00:00
parent 5427c73f1c
commit 702e05e7f7

View File

@@ -31,7 +31,7 @@ async def drive_forward():
async def monitor_distance():
"""Monitor ultrasonic sensor and stop when wall is detected."""
while True:
distance = lazer_ranger.distance()
distance = await lazer_ranger.distance()
print('Distancing...',distance)
if distance < WALL_DISTANCE: