mBot Blockly obstacle detection


#1

Hi, my kid is doing mBot Blockly tutorial and we are stuck on Wait number 5.
It asks us to “Tell the mBot to move forward, and turn left for 1 second until there s obstacle ahead.”
This is what we wrote
“keep moving forward at the speed of 150”
“turn left 1 second at the speed of 150”
“wait until obstacle ahead”

No matter how we tried, it doesn’t pass. Is there anything wrong in the code or is it because the sensor isn’t working correctly?

I also see that my mBot is walking the wrong direction, When we wrote “move forward”, it’s actually moving backwards. Anyone know what happened?
Thanks


#2

Hi jct,

You probably have the motors reversed. For the code of number 5, I will look and send it to you during the day


#3

I just have the screen print in French
2022-02-23%2018_58_59-Window


#4

Thanks. I checked switched the motor cable and it’s moving forward as expected!


#5

Thanks! I tried the code and it passed. It seems that I didn’t understand the statement correctly. The description is confusing to me. But maybe it’s my problem. Thanks again!


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.