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



A.Pretty car 4.Handle control

Posted by Fiona Su on

In this lesson we will learn to use the Handle to remotely control the building blocks.

1. 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.

2. About Pretty car code:

Please refer to the Handle code file of this experiment.

Please refer to the Pretty car code file of this experiment. 

3. Steps:

3.1 Handle rocker control

First, we need to download the microbit-Pretty-car-handle-remote-control.hex 

to micro:bit of Pretty car, you can see that the micro:bit dot matrix shows an pattern as shown in Figure 1.1.  

we need to download the microbit-Handle_rocker_control.hex to micro:bit of Handle, you can see that the micro:bit dot matrix shows an “heart” as shown in Figure 1.2.

image.pngimage.png 

Figure 1.1                                       Figure 1.2

Then, open the micro:bit handle. After the handle is connected with the micro:bit building block Pretty car, you can use the joystick to control the forward, backward, turn left, and turn right .

And use the handle button to switch the Color of RGB light. Press the rocker to turn off the RGB light.

3.2 Handle gravity control

First, we need to download the microbit-Pretty-car-handle-remote-control.hex to micro:bit of Pretty car, you can see that the micro:bit dot matrix shows an pattern as shown in Figure 1.3.  

we need to download the microbit-Handle-gravity-control.hex to micro:bit of Handle, you can see that the micro:bit dot matrix shows an “heart” as shown in Figure 1.4.

image.pngimage.png 

Figure 1.3                                       Figure 1.4

Then, open the micro:bit handle. After the handle is connected with the micro:bit building block Pretty car, you can shake handle to control the forward, backward, turn left, and turn right .

And use the handle button to switch the Color of RGB light. Press the rocker to turn off the RGB light.

image.png 

 The code of the experiment: 4.Handle control.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