Debugging
When you "Debug" a piece of coding, you check it for errors and fix them.
When you "Debug" a piece of coding, you check it for errors and fix them.
You will need to do this when you try and run code on your mBot and it doesn't do what you are expecting it to.
You will need to do this when you try and run code on your mBot and it doesn't do what you are expecting it to.
You may also get an error message when you try to upload your code to the mBot.
You may also get an error message when you try to upload your code to the mBot.
The Debugging Process
The Debugging Process
Things to check
Is the cable connected to the mBot and computer correctly?
Do you remember to click the connect menu and then click on upload?
Is the mBot turned on?
Is there enough power in the mBot batteries?
Is the Makeblock software asking you to update the firmware on the mBot?
Did you remember to use the correct event at the start of your code so the mBot knows there are instructions coming?
Are all the blocks in your code in the correct order?
Have you missed any code blocks out?
Are the variables correct on your code blocks?
Do you need a forever block anywhere so it keeps doing what you need it to do?
Debugging Practice
Look at the code on these pages.
Can you see what is wrong?
Can you rewrite the algorithm to put it right?
Don't forget - The wheels and motor not being tightly held in place might also cause the mBot to move in strange ways. You can always use the screw driver to tighten up the nuts and bolts that hold everything together.
Don't forget - The wheels and motor not being tightly held in place might also cause the mBot to move in strange ways. You can always use the screw driver to tighten up the nuts and bolts that hold everything together.