How to get the mBot respond to input?


#1

I learned from another topic that the control-block-shaped “when button pressed” block doesn’t work, and you need to put “if button pressed” in a loop. This works, but is unlike what my kids have learned in Scratch, so is confusing them. Plus, the same thing doesn’t seem to work at all with the IR remote. My daughter is now upset that the IR remote doesn’t control her mBot at all, so I want to figure this out quickly!

Thanks!


#2

You need to use the USB to update the firmware which removes the default program.
Then you can use the mBlock to control the mBot over bluetooth or whatever connection you want.
I have found that only the USB works for uploading anything to the bot permanently.


#3

Yeah, but my kid wants to program it to respond to the remote control. Basically, we want to start with but enhance the default program.


#4

I updated the firmware (Mac using Yosemite) over the USB but I cannot seem to get the remote to work at all which is a little irritating. Cannot find a guide to see if I did a wrong process, any help would be gratefully appreciated.


#5

Don’t forget that to use the default program you have to re-download that to your mBot after a firmware update.


#6

I actually just read that elsewhere and it worked. Thanks for the swift response, total noob with an excited 5 year old who is currently racing a robot after the cat :wink:


#7

After the recent update to 2.2.0, I can’t use the “if button pressed” condition anymore.
When I try to upload to mBot, it says that the block is incompatible and must be removed.

I’m on OSX, it seem to me that the block “when space key pressed” from Events does not work. No code is created when I use these blocks.

Can anyone help?


#8

The light blue blocks in the Sensing group are Scratch only blocks and cannot be uploaded to the Arduino.
you can however incorporate them into a Scratch/Arduino program that runs on your desktop.
Only the Control, Data&Blocks, Operators and Robots can be uploaded to Arduino.


#9

ok, so how can i make mbot respond to key presses?
For example when I connect via bluetooth?

The video tutorial is not valid anymore because it uses blocks from the Events group.

My daughter lost the IR remote control
(already… sigh…)


#10

just replace the events with robots commands like “When Button Pressed” (the black button on the mBot)
If you need more then the ir remote is the easiest but you can also use bluetooth commands or other modules. You can also get tricky with the ultraslow sensor and do different thing at different distances, like an air harp.


#11

It would seem possible that a learning remote might work in place of the original remote and one that can take files to define commands like the harmony line of remotes might solve you problem if the original can’t be obtained. They have this module which comes with a similar remote that you could also try. It is missing some of the buttons.

Also the button on the mBot is greyish near the IR reicever/transmitter.


#12