mBot Ranger and loudness


#1

I’m trying to make the mBot ranger go forward when it “hears” something loud
and then after it “hears” again something - to go backward.
Here is the code:

image

But it goes always backwards. I added the wait 1 sec just in case that it “hears” the sound 2 times and executes the code after the second wait until.

thanks :slight_smile:


#2

I restructured your code concept slightly and it seemed to work for me. The only oddity is that the motors never stop (which I would expect given the stop moving block at the top of the loop.

Bear in mind that mBlock 5 is still in beta. :slight_smile:


#3

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