In this lesson we will learn to use the Bluetooth APP to remotely control the building blocks spider.
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.
Please refer to the microbit-Pretty-car-Android-Bluetooth-APP-control.hex file of this experiment.
Please refer to the Assembly instructions folder for building blocks assembly steps.
As shown below,
Left motor connect to M1 interface of super:bit.
Right motor connect to M3 interface of super:bit.
5.Download and install APP:
Android Please use the browser to scan the QR code to download and install or Download: micro:bit Bluetooth APP ; Apple please use camera to scan the QR code to enter the APP Store to download and install or search for "Mbit" or "Yahboom" in the APP Store. As shown in figure below.
After the download is complete, install it.
Note: If there are any prompts on the phone during installation, please select "Yes".
(for example, you need to obtain your mobile phone location permission.)
6.1 First, we need to download the microbit-Pretty-car-Android-Bluetooth-APP-control.hex
to micro:bit, you can see that the micro:bit dot matrix shows an "S" as shown in Figure 1.1, which is the state that Bluetooth is not connected.
6.2 Open the Bluetooth of your mobile phone, and open the Bluetooth APP, Mobile phone close to robot Bluetooth automatic connection. If Bluetooth can't connect automatically, you need to click 【Search Bluetooth devices】to connect the Bluetooth between the phone and the robot. As shown in Figure 1.2
6.3 When the APP interface is switched to the screen shown in Figure 1.3, and the robot's dot matrix is switched to the pattern shown in Figure 1.4, the connection is successful and the next operation can be performed.
If Bluetooth is disconnected, micro:bit will display the pattern of Figure 1.5.
Figure 1.4 Figure 1.5
7.About APP interface:
7.2 Car light
!!!Note: Mode option is unavailable.
The code of the experiment: 3.iOS Bluetooth APP control.rar