Introduction: Coding the Basics With Mbot
So if you always wanted to have your very own robot and don't know how to code, well you have come to the right place. Today we will use the Mbot by makeblock to code. You have to assemble first but there is a guide for that. Here is the building instructions -Building instruction So lets get started. :)
The Mbot robot - A $50 robot (best for kids)
A computer that can run the mblock 5 or https://ide.mblock.cc/#/
Step 1: Getting the Mbot to Light-up
After opening the mblock app or site , connect your Mbot via cable or Bluetooth. Then from the Events in the left side drag and drop the WHEN FLAG CLICKED block to our coding area. Then from the show side take LED ALL SHOWS COLOUR block (you can change the all to left or right) attach the block to the When flag clicked. Make sure you have connected your robot and click the flag in the green circle under the stage (the one with the panda).You can see your robot's led turn to red (the red you can click to change to any other colour you like). Let there be light.
Step 2: Adding Sound to the Mbot
Same for the flag clicked but this time under the show tab drag and drop the PLAY NOTE FOR BEAT under the green flag block. You can click on that C4 and change it to any other and you can add more to play a song or turn it to an Ambulance With the forever loop in the control tab. Use the green flag button to play your beats. Lets get this party started!!
Step 3: Move the Mbot
Again same for the green flag and then go to the Action section and take any movement blocks you can change the values according to our liking. I used the stop moving but its optional. Try it out , you can also make it dance.
Step 4: Getting the Best Out of Mbot
You can keep on exploring with blocks but if you get stuck somewhere I will upload the second part soon.
You can refer to videos in YouTube like from the official channel of Makeblock.
PLS VOTE FOR ME IF YOU LIKE THIS INSTRUCTABLE
Participated in the
First Time Author Contest