I can't program my Mbot to work


#1

I have Mbot RB-Mab-95 and programming using Mblock_v3.4.3 rev2 on a Macbook.
I’m just trying out some simple code to see how it works. You can see the image below for what I wrote so far. What I want is pressing button A on remote control to have the bot move forward until it hitting something, then it should go backward.

I loaded the code into Mbot successfully but nothing happens when pressing the button.
What’s wrong with my code and how can I fix it?

Thanks,


#2

Hi namsteve,

In the program, you use the if conditional statement, the program only excute one time so that the program has been excuted completely before you press the button A on IR remote.

You may need keep the program wait before you press the A button IR remote. Below is a simple program for reference:


#3

oh, this totally makes sense. Thank you so much.