Walking Emoji | Maqueen Plus V2 Getting started Tutorial 03

0 1709 Easy

 

Emojis are now considered to be a large part of popular culture these days. Maqueen Plus V2 also has his emojis. In this chapter, let's control Maqueen Plus V2 to walk along a circle while displaying emojis on its LED screen.

Goal

1. Learn the differential steering principle

2. Get to know the function of the "pause" block

Electronic Component

Command Learning

Hands-on Practice

Step 1 Create a New Project

1. Input https://makecode.microbit.org/ into your browser to enter the MakeCode editor.

2. Click "new project" to enter the MakeCode programming interface.

3. Add the Maqueen Plus V2 library: https://github.com/DFRobot/pxt-DFRobot_MaqueenPlus_v20

Step 2 Programming

1. Display emojis

Drag the "show icon" block into a "forever" block, then a heart pattern will be displayed on the micro:bit LED matrix.

2. Maqueen Plus V2 moves clockwise

Program Maqueen Plus V2 to make it move clockwise along a circle. According to the differential steering principle, make the left motor move forward at the speed of 255, and the right motor move forward at 50.

3. Maqueen Plus V2 moves along a circle

Let Maqueen Plus V2 move along a circle. Set the pause time via the pause module to make it move along a perfect circle.

When Maqueen Plus V2 has walked a complete circle, display a smiley face on micro:bit LED matrix.

4. Maqueen Plus V2 stops

Maqueen Plus V2 will move along a circle repeatedly. Now we can use another motor control block to make it stop. As shown below, change the "left" to "all", then both motors will stop rotating.

5. Complete program

6. Name your project as "Walking Emoji" and save it.

Step 3 Download Program

1. Connect to a computer: Connect the micro:bit to your computer with a USB cable before downloading.There will be a hard disk named "micro:bit" appearing in the computer when the connection is successful.

2. Download the program: Click "Download" to download your project into the micro:bit hard disk.

3. Plug in the micro:bit board: After downloading the program, unplug the USB cable and plug the micro:bit board into Maqueen Plus V2.

Step 4 Effect Display

Turn on the power switch, then Maqueen Plus V2 will start to run along a circle while showing a heart pattern on  the micro:bit LED matrix. When he stops, a smiley pattern will be displayed on the screen.

Think & Explore  

How is the movement state when the two motors are rotating at different speeds and directions? Program Maqueen Plus V2 to explore, and complete the form below. Tip: Just need to change the direction and speed of the motor control block.

Click Buy micro:Maqueen Plus V2 (Ni MH Rechargeable Battery) - an Advanced STEM Education Robot for micro:bit - DFRobot

Click Buy micro:Maqueen Plus V2 (18650 Battery) - an Advanced STEM Education Robot for micro:bit - DFRobot

Engage in learning the next Robot project:City Defender - A Police Car

Engage in learning the previous Robot project :   Let's move, Maqueen!

 

 

License
All Rights
Reserved
licensBg
0