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



Handle Game Joystick Tutorial A.Building block car 8.handle remote control Following car

Posted by Fiona Su on

Handle Game Joystick Tutorial A.Building block car 8.​handle remote control Following car

Following_car_program.hex

Handle_rocker_program.hex

Handle_gravity_sensing_program.hex

handle remote control Following car

image.png image.png

The above three programs, which we have provided. They are in the course directory.

If you want to use the program we provide directly, Please read the following carefully:

1. You should download the Following-car-program.hex  to the micro:bit board of the Sniper.

2. You should download the Handle-rocker-program.hex  to the micro:bit board of the handle.

3. If you want to use the handle gravity sensing to control the Tower crane, you should download the Handle-gravity-sensing-program.hex  to the micro:bit board of the handle.

After the program is downloaded, the handle and the car are powered up normally, they will be automatically paired, the two micro:bit board LED dots will show a heart on it, you can start to control.

1.Experimental phenomena

After downloading the program, open the power switch of the Following car and the power switch of the micro:bit handle, they will be automatically paired. When you press the micro:bit handle remote control button, the Following car  will have the corresponding action. The button on the right side of the remote control is used to control the color of the lights, and pressing the joystick down to turn off the light. Pushing the rocker forward, backward, left, right is to control the advance, back, turn left and turn right of the Following car .

2.Preparation before class

We needs to be ready:

Building Block Following car *1

micro:bit handle*1

USB data cable*1

2-1.Two programming methods:

Online programming:

 First, we need to connect the micro:bit to the computer by USB data cable, the computer will pop up a USB flash drive.Then, click on the URL in the USB flash drive: http://microbit.org/ to enter the edit process interface, click to 【Extensions】, and copy the package URL: https://github.com/lzty634158/yahboom_mbit_en to the input field, and you can use the building blocks of the Yahboom software package.

Offline programming:

Open the offline programming softwareimage.png, click to 【Extension】 and copy the package URL: https://github.com/lzty634158/yahboom_mbit_en to the input field, and you can use the building blocks of the Yahboom software package.

For detailed programming, please read the documentation before class 【1. Preparation before class】----【Introduction of programming method】. We use micro:bit official website for online programming in here. 

3.Studying blocks 

image.png

image.png

image.png

image.png

4.Programming

Following car code:

Next, we started to write the program for the building block Following car. After the writing, we need to download the program to the micro:bit board of the building block Following car.

image.png 

The program is shown below:

image.png 

image.png 

 image.png

Handle joystick control program:

After adding the https://github.com/lzty634158/GHBit package, we can see the Yahboom handle blocks in the left side of the building block, as shown below:

image.png

image.png 

Next, we started to write the joystick control program. After writing, we need to download the program to the micro:bit board of the handle.

image.png 

The program is shown below:

image.png 

We also offer another way to control the Sniper, that is Handle gravity sensing control.

Handle gravity sensing control program is shown below:

image.png 

Tutorial

Micro:bit Robot Control Handle Game Joystick Tutorial

  • Last Tutorial>> 
  • Next Tutorial>>

Buy Yahboom Micro:bit Robot Control Handle Game Joystick

0 comments

Leave a comment

Please note, comments must be approved before they are published