## Project 16:Motor ![](./media/Makecode_77f3b857.png) 1\. **Description** The Keyestudio 4WD Mecanum Robot Car is equipped with 4 DC reduction motors, also called gear reduction motor, which is developed on the ordinary DC motor. It has a matching gear reduction box which provides a lower speed but a larger torque. Furthermore, different reduction ratios of the box can provide different speeds and torques. Gear motor is the integration of gearmotor and motor, which is applied widely in steel and machine industry Micro:bit motor driver shield comes with a DRV8833 chip. In order to save the IO port resource, we control the rotation direction and speed of 4 DC gear motors with the DRV8833 chip. ![Img](./media/Makecode_4c9781dc.png) Front ![](./media/Makecode_4919ce3b.png) Back ![](./media/Makecode_59c34b6e.png) STC8G1K08 Chip circuit ![](./media/Makecode_8874ded0.png) HR8833 Motor driver circuit 2\. **Preparation** - Insert the micro:bit board into the slot of keyestudio 4WD Mecanum Robot Car V2.0 - Place batteries into battery holder - Dial power switch to ON end - Connect the micro:bit to your computer via an USB cable - Open the Web version of Makecode 3\. **Test Code1** ![](./media/Makecode_3a759dd8.png) Click“JavaScript" to view the corresponding JavaScript code: ![](./media/Makecode_242ba6ca.png) 4\. **Test Result1** Download code 1 to micro:bit board, dial POWER switch to ON end. Smart car goes forward for 2s and stops for 2s. 5\. **Test Code2** ![](./media/Makecode_a3a9d39a.png) ![Img](./media/Makecode_4eb6b574.png) Click“JavaScript" to view the corresponding JavaScript code: ![](./media/Makecode_ee70b846.png) 6\. **Test Result2** Download code 2 to micro:bit board, the car goes forward for 2s, turns back for 2s, turn left for 2s, turn right for 2s and stops for 2s and repeats this pattern.