MagicBot extension for MagicCode
Magicbot extension
Magicbot Blocks
1. Go forward/backward/stop : This block allows to program the Magicbot to move forward , back ward or stop. The speed is recommended to keep over 80. The travelled distance can be controlled by altering the speed and the duration before stop.
To utilize this block you can build following example:
2.Turn robot left or right : This block allows to program the Magicbot to turn left or right. The speed is recommended to keep over 80. The turned angle can be controlled by altering the speed and the duration before stopping.
You can try out this block by building following example:
3.Run motor1/motor2 : This block allows to program the Magicbot to control only one motor to rotate forward direction. The speed is recommended to keep over 80. The travelled distance can be controlled by altering the speed and the duration before stop.
You can try out this block by building following example:
4.Distance to obstacle : This block allows to program the Magicbot to detect objects in front of the Magicbot and get the distance to the obstacle.
You can try out this block by building following example, this acts as an obstacle avoidance robot:
5.Sense object at : This block allows to program the Magicbot to detect objects in front of the Magicbot at a certain distance. The detected distance can be changed by changing the value.
You can try out this block by building following example, this also acts as an obstacle avoidance robot:
6.Read line sensor : This block allows the Magicbot to read the individual sensor of the line following sensors.
You can try out this block by building following example, this also acts crude line follower robot:
7.Calibrate line sensors :Â This block allows to program the Magicbot to detect the line beneath the robot and calibrate. Keep the Magicbot at the center of the line (Black line on white backgrund) and run this block.Â
8.Sense the line position : This block allows to program the Magicbot to detect the line position with the line. If the Magicbot turned to right this will output positive values and if the Magicbot turned left this will output the negative values. We use this value change to move robot forward, left and right to keep the robot on the line.
Using above two blocks, we could develop an advanced line follower, which could travel a line smoothly.