5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



E.Mobile shooter 1.Dance battle

Posted by Fiona Su on

1.Learning goals

In this lesson, we mainly learn how to control building block motor and RGB lights by micro:bit and Super:bit expansion board.

2.Programming method

Mode 1 online programming: First, we need to connect the micro:bit to the computer by USB cable. The computer will pop up a USB flash drive and click on the URL in the USB flash drive: http://microbit.org/ to enter the programming interface. Add the Yahboom package https://github.com/lzty634158/SuperBit to program.

Mode 2 offline programming: We need to open the offline programming software. After the installation is complete, enter the programming interface, click【New Project】, add Yahboom package:

https://github.com/lzty634158/SuperBit, you can program.

3.Looking for blocks

The following is the location of the building blocks required for this programming.

image.png 

image.png 

image.png 

image.png 

4.Combine building block

The summary program is shown below:

image.png 

image.png 

image.png 

image.png 

5.Assembly steps

Please refer to the Mobile shooter assembly steps in the Assembly instructions folder for building blocks assembly steps.

6.About wiring:

As shown below,

Left motor connect to M1 interface of super:bit.

Right motor connect to M3 interface of super:bit.

Servo connect to S1 interface of super:bit.

image.png 

!!!Note:When using the program related to the building block servo for the first time.

First, we need to remove the gear on the building block servo.Then, download the program to micro:bit. Next, turn on the power of the Super:bit expansion board and wait for the building block servo to turn to the initial position and turn off the power. Finally, we need to open the trolley clip to the widest point, and then install the gear on the building block servo.

7. Experimental phenomena

After the program is successfully downloaded, the micro:bit dot matrix will display the smile pattern and play Happy Birthday. The car will advance 0.5s, back 0.5s, spin left 1s, spin right 1s,spin left 0.2s, spin right 0.2s,turn left 0.5s, turn right 0.5s.

At the same time, RGB lights will change color:red -- green -- blue -- violet.

At the same time, the shovel will reset --- throw.

Keep this state into the loop.

If you need to start over, press the reset button on the back of the micro:bit board.

 The code of the experiment: 1.Mobile shooter Dance battle.rar

Tutorial

Yahboom Micro:bit Remote Control Building Block 5 in 1 Robot Car Kit Tutorial

Buy Yahboom Micro:bit Remote Control Building Block 5 in 1 Robot Car Kit

0 comments

Leave a comment

Please note, comments must be approved before they are published