Hi there,
We had an mbot for Christmas and have built him and have programmed him using scratch. He will move and avoid obstacles using the sensor but he won’t stop! What are we doing wrong?
Thanks so much,
Sarah and Alfie
Hi there,
We had an mbot for Christmas and have built him and have programmed him using scratch. He will move and avoid obstacles using the sensor but he won’t stop! What are we doing wrong?
Thanks so much,
Sarah and Alfie
Hi Alfie,
I have tested the same program, it works most the time. Sometimes doesn’t work.
You may test the following program:
For further program, you may refer to our learn website.
thank you for getting back to me. At the moment, we can make it move, turn and tell the distance, but nothing we do makes it stop…apart from turning it off.
We’ve copied your suggestion exactly, but still very new to this, so struggling to see why we can’t make that part of the programme work.
thank you for your help…any other suggestions?
Alfie
Hi Alfie,
With above program, the mBot will stop move when you press the up arrow.
Can’t tell why it doesn’t work on your side, while you may take a video to show all your operation and the behaves on your mBot to have a check.
before trying to video as you’ve suggested, we connected using the USB cable.
Now we can’t restore the default programme because the option is greyed out, so we can’t run from the laptop through bluetooth, so we can’t show you that this programme doesn’t stop our mbot.
We’ve made a post about the grey’d out options in ‘general’…not sure if that was the best place…we are struggling with this, as things don’t seem to be doing what they’re expected to do…beginning to wonder if it is us as newbies, or if there is a problem with the kit we’ve bought?
thank you for your help…with this, and hopefully the related post.
Alfie
Hi alfie,
For the upgrade firmware issue, please see the explanation under your other related post.
As for the example program I provided before, there is sitll flaw, it doesn’t work either sometimes since we haven’t set the motor to stop in the whole program.
If you want to stop the whole program on the mBlock as well as stop the motors on robot, try the program below instead:
Programming robots can be frustrating.
I have a simple mantra that I teach kids.
Robots are Dumb, They can only count to One.
Why do I drum this in? Because it emphasises the need for telling the robot to do everything.
You cannot assume that the robot knows what you want it to do, eg STOP.
SO in every program you will find that you need to tell the robot motors to move, forward, backwards, left and right at a particular speed. See you need to tell it everything.
To stop it, you need to tell it to STOP, set motors to zero speed.
Now for the plugging in the USB and losing access to some of the blocks.
You have moved into Download mode.
The mode you are in with the When (green Flag) Check block is used is the standard Scratch mode and will work in what I call immediate mode. You can program and run it immediately. However, the program is not running on the robot, it’s running on the computer.
now if you use the mBot Progam block to start each code block you will have access to only those blocks that the Arduino mBlock understands.
You will also be able to download you program to the mBot and run it autonomously, disconnected from the computer. SO after downloading the program, which takes about one minute, the program will be stored on the mBot and you will run immediately. You can also turn the mBot off and disconnect it from the PC, turn it on and the program will run.
Have fun they are a great little robot.