Case 19 - Detecting Robot (I)
Part 1 Objective
Write a program to make Detecting Robot move forward and backward.
Part 2 Preparation
Mechanical parts and electronic modules of Detecting Robot
USB cable (Type-B) x 1
Computer with network access x 1
Follow the building steps to build Detecting Robot. Install the MegaPi encoder/DC motor drivers on MegaPi, connect the motors to the motor ports on MegaPi by using the motor cables, connect MegaPi to the computer by using the USB cable, open mBlock 5 (PC client, web version, or mobile app), click +add, select Ultimate 2.0 from Device Library, click Connect, and select the Upload mode.
Part 3 Programming
Control Detecting Robot to move forward and backward.
Part 4 Practice
Try to make Detecting Robot bypass an obstacle.
Try to make Detecting Robot turn left, turn right, and turn around.