ultrasonic/distance sensor use #1932
Unanswered
incredibelles
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hello, The distance block is in the input palette. Bert |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having trouble wrapping my head around the ultrasonic sensor use in pybricks and could use a little help. I've made it this far:
but this prints "UltrasonicSensor"
and this prints "0"
So how do I retrieve the current ultrasonic/distance sensor value?
Ultimately, I'm trying to get to something like this (I think? does this code look right? i can't test it as I don't know the value I'll need)
where the robot is checking the sensor data and will drive until the distance is achieved, stop, then turn left.
Beta Was this translation helpful? Give feedback.
All reactions