Introduction

In the previous course, we learned how to use an Android phone to control the car through Bluetooth. Here, we will learn how to use an IOS device to control the car.

The makecode programming code in this lesson is the same as that in the Android phone control lesson. Let’s learn how to start using the IOS Micro bit app first.

About the app

The micro:bit app is the essential companion to the BBC micro:bit, the pocket sized programmable computer. The app provides online access to a choice of code editors for programming your micro:bit and, when your program is ready, the app beams it to the micro:bit via Bluetooth wireless. Easy-to-follow screens lead you through the process of pairing your iPad (or iPhone) to the micro:bit and then transferring your program code.

In this lesson we will use the GamePad function in the app Monitor and Control interface.

APP Download

Open the App store on your ipad/iPhone.
Search the micro:bit to download and install.

Pairing

After downloading, open Bluetooth service of your phone, open the micro:bit interface, click Choose micro:bit.

图片

Then click Pair a micro:bit, and click Next.

图片

Power on the micro:bit board, HOLD the A and B buttons, then press and release RESET button. The micro:bit main board will enter the Bluetooth pairing mode.
You should see an image showing on the LED matrix.

图片

Copy the pattern from your micro:bit device and tap Next.

图片

Continue to tap Next to pair.

图片

Restart the micro bit after successful pairing.

Code Program

Control the Robot Car via Bluetooth

Open the APP, then TAP the Monitor and Control on the APP interface.

图片

Tap the Add and then select the Gamepad.

图片

And you should see the control interface shown below. Click Start to connect.

图片

Connection successful! “Smile” is displayed on Bluetooth connection, and “X” is displayed on Bluetooth disconnection.(You can click Stop to disconnect.)

The buttons on the upper side of the control panel control the movement of the car, and the buttons on the lower side of the control panel control the headlights and horns of the car.