Keyestudio Micro:bit Mini Smart Robot Car V2 Instructions Manual

Keyestudio Micro:bit Mini Smart Robot Car V2 Instructions Manual

Advertisement

Micro:bit Mini Smart Robot Car V2

Advertisement

Table of Contents
loading

Summary of Contents for Keyestudio Micro:bit Mini Smart Robot Car V2

  • Page 1 Micro:bit Mini Smart Robot Car V2...
  • Page 2: Table Of Contents

    Content 1. Description ......................1 2. Specifications ......................2 3. Packing List ......................2 4. Robot Installation ....................1 5. micro:bit Driver Installation ................. 1 6. micro:bit Example Use ..................8 Step 1: Connect It ....................8 Step 2: Program It ....................9 Step 3: Download It .....................
  • Page 3 Ultrasonic Ranging ....................64 How to Build an Ultrasonic Following Robot? ..........71 11. Obstacle Avoiding and Following Robot Infrared Avoiding Obstacles ................76 How to Build an Obstacle Avoiding Robot? ............81 How to Build an Object Following Robot? ............85 Infrared Remote Control ..................
  • Page 4: Description

    Bluetooth, accelerometer, compass, three buttons, 5x5 LED matrix, mainly used for teens programming education. The Micro:bit Mini Smart Robot Car V2 integrates ultrasonic and infrared obstacle avoidance, line following as well as infrared and Bluetooth control functions. It comes with a passive buzzer for playing music; a KEYES-2812-18R module for controlling 18 RGB LED colors; a photocell for detecting the light intensity;...
  • Page 5: Specifications

    2. Specifications 1) Voltage: DC 5V 2) Current: USB power supply or power supply with a capacity greater than or equal to 1A 3) Maximum power: maximum output power is 10W 4) Operating temperature range: 0-50 degrees Celsius 5) Dimensions: 120*90.7mm 6) Environmental attributes: ROHS 3.
  • Page 6 Item Quantity Image Micro:bit robot bottom shield (Black and Eco-friendly) Acrylic pack of 3 pieces T=3MM...
  • Page 7 HC-SR04 ultrasonic sensor KEYES-2812-18R Module (welded with yellow curved pin) N20 motor wheel diameter:43mm ; width: 19mm ; hole diameter: 3mm type D ABS plastic + rubber yellow steel universal wheel W22*H15MM...
  • Page 8 M1.6*10MM round head screw M3*6MM round head screw M1.6 304 stainless steel nut Double pass M3*35MM hex copper pillar M3*10MM flat-head screw M3 Nickel plated nut...
  • Page 9 M2*12MM round head screw M2 Nickel plated nut yellow-black handle 3*40MM phillips screwdriver USB Cable A/MICRO OD: 4.0 black L=1.2m eco-friendly Male to female jumper wire 10CM random color Male to female jumper wire 15CM random color...
  • Page 10 4. Robot Installation Firstly prepare all the assembly components before install the micro:bit robot. a. Next let’s begin to install the wheel on Micro:bit bottom shield. Prepare well universal wheel, two yellow wheels, 4pcs M3*6MM round-head screws and 4pcs dual-pass M3*35MM hex copper pillars.
  • Page 11 b. To begin with, should use two screws of universal wheel to mount the wheel on the bottom shield.
  • Page 12 The front and back view are shown as below picture:...
  • Page 13 After that, install two yellow wheels into the shield’s motor. c. Mount the 4pcs M3*6MM round-head screws and 4pcs dual-pass M3*35MM hex copper pillars onto the bottom shield.
  • Page 15 d. Well, ready to install the electronic elements:  Two Acrylic plates  Ultrasonic module  KEYES-2812-18R module  Micro:bit main board  6pcs M1.6*10MM round-head screws  6pcs M1.6 304 stainless steel nuts  4pcs M3*6MM round-head screws  1pcs M3*10MM flat-head screw ...
  • Page 16 At first fix the KEYES-2812-18R module on the Acrylic plate with 2pcs M1.6*10MM round-head screws and 2pcs M1.6 304 stainless steel nuts.
  • Page 18 Then mount the HC-SR04 ultrasonic module on the Acrylic plate with 4pcs M1.6*10MM round-head screws and 4pcs M1.6 304 stainless steel nuts.
  • Page 19 Installed well, fix the two Acrylic plates together with 1pcs M3*10MM flat-head screw and 1pcs M3 nickel plating nut...
  • Page 21 e. Finally you should get the parts below:...
  • Page 23 Hookup Guide: Connect the KEYES-2812-18Rmodule and HC-SR04 ultrasonic module to the bottom shield with F-M jumper wires. KEYES-2812-18R module Micro:bit shield HC-SR04 ultrasonic module Micro:bit shield Echo Trig...
  • Page 25 The final step is to mount the Acrylic plates on the 4pcs dual-pass M3*35MM hex copper pillars of micro:bit bottom shield with 4pcs M3*6MM round-head screws.
  • Page 26 Insert the micro:bit main board into bottom shield. Congrats! The fantastic micro:bit robot is installed well.
  • Page 27: Robot Installation

    5. micro:bit Driver Installation Next, let’s install the driver for micro:bit main board. 1) First of all, connect the micro:bit to your computer using a USB cable. 2) Then, double click the driver software to install it. Here you can click the driver icon to download.
  • Page 29 3) After that, click Next to continue the installation.
  • Page 30 4) Wait the driver installing finished.
  • Page 31 5) Completing the driver installation.
  • Page 32 6) Driver installation completed, then you can right click the “Computer” —> “Properties”—> “Device Manager”.
  • Page 33 You can check the detailed Ports information shown as below.
  • Page 34: Micro:bit Example Use

    6. micro:bit Example Use Step 1: Connect It Connect the micro:bit to your computer via a micro USB cable. Your micro:bit will show up on your computer as a drive called 'micro:bit'.
  • Page 35: Step 2: Program It

    Step 2: Program It Use micro:bit MakeCode Block editor https://makecode.micro:bit.org/ to write your first micro:bit code. You can drag and drop some example blocks and try your program on the Blocks Editor. Shown below.
  • Page 36 Click the JavaScript, you can see the corresponding program code. Shown as below figure.
  • Page 37: Step 3: Download It

    Step 3: Download It Click the Download button in the editor. This will download a 'hex' file, which is a compact format of your program that your micro:bit can read. Here you can name the project as LED1, then click “Save”. Shown below.
  • Page 38: Step 4: Play It

    Once the hex file has downloaded, copy it to your micro:bit just like copying a file to a USB drive. On Windows you can right click the downloaded file and choose "Send To→micro:bit." Step 4: Play It The micro:bit will pause and the yellow 5*5 LED on the back of the micro:bit will display the images while your code is programmed.
  • Page 39 You can power it using USB cable or battery. The battery holder should connect two 1.5V AA batteries.
  • Page 40: Micro:bit Pins

    7. micro:bit Pins Before getting started with the following projects, first need to figure out each pin of micro:bit main board. The BBC micro:bit has 25 external connections on the edge connector of the board, which we refer to as ‘pins’. The edge connector is the gray area on the right side of the figure below.
  • Page 42 More reference you can click the link below: BBC micro bit Pins: http://micro:bit.org/guide/hardware/pins/ BBC micro:bit website: http://micro:bit.org/ Micro bit MakeCode Block Editor: https://makecode.micro:bit.org/ Meet micro:bit starter programming: http://micro:bit.org/guide/ BBC micro:bit Features Guide: http://micro:bit.org/guide/features/ BBC micro:bit Safety Warnings: http://micro:bit.org/guide/features/ BBC micro:bit Quick Start Guide: http://micro:bit.org/guide/quick/...
  • Page 45 Get Started with Micro:bit Robot Projects...
  • Page 46 Knowledge of Micro:bit Shield Elements...
  • Page 47: Playing Music

    You can use micro:bit to code the melody of a song, quite fun and simple. The keyestudio Micro:bit robot shield comes with a passive buzzer element. The signal terminal of buzzer is connected to the P0 interface of micro:bit main board.
  • Page 48 Birthday.
  • Page 49 Source Code What will you see Send well the test code to micro:bit main board, then insert the micro:bit main board into the micro:bit robot shield. Connect a 18650 battery to the shield, and turn the POWER and BUZZER switch ON. You should hear the micro:bit robot shield playing a song of 《Happy Birthday》...
  • Page 50: Micro:bit Led Matrix Display

    Micro:bit LED Matrix Display Description LED stands for Light Emitting Diode. The micro:bit has 25 individually-programmable LEDs, allowing you to display text, numbers, and images. The micro:bit MakeCode Block editor has built-in library. So you can use it to control the 25 LED lights on and off, showing the different images.
  • Page 51 Source Code...
  • Page 52 What will you see Send well the test code to micro:bit main board, powered on, the micro:bit 25 LED lights show a big heart for one second, then show a small heart image for one second, repeatedly.
  • Page 53: Rgb Light Cycle

    RGB Light Cycle Description The KEYES-2812-18R module comes with 18 WS2812 LED lights and a yellow pin header, fully compatible with micro:bit main board. In this circuit, we are going to control 18 WS2812 LEDs displaying different status by using control pin P5 on micro:bit main board.
  • Page 54 Source Code Note: before setting the test code, you need to add the libraries. Follow the instructions below: Open the micro:bit Software MakeCode editor https://makecode.micro:bit.org/ Click to add New Project, then you will see the interface below:...
  • Page 55 Then click Advanced, find the Extensions to add file.
  • Page 56 Search “neopixel”, then add the library file.
  • Page 58 Library added well, you should see the Neopixel on the Blocks interface.
  • Page 59 Test code 1: You can drag the code file to the MicrosoftMakeCode window.
  • Page 60 What will you see Send well the test code to micro:bit main board, then insert the micro:bit main board into the micro:bit robot shield. Connect a 18650 battery to the shield, and turn the POWER switch ON. You should see the 18 RGB LEDs on the KEYES-2812-18R module are all turned on, changing with seven colors separately and circularly.
  • Page 61 method is almost the same. You are able to open the program on the micro:bit makecode environment or directly send to micro:bit main board. If upload the test code 2, 18 RGB LEDs flash with colorful light, turning a round and then off. If upload the test code 3, 18 RGB LEDs turn circle, one circle of one color, always cycle;...
  • Page 62: Rgb Light Test

    RGB Light Test Description There are two RGB lights on the robot shield. You will learn how to make the two RGB lights as indicator for the micro:bit robot. To save the IO port resources, we will use a PCA9685PW chip to drive the two RGB lights. In the circuit, Pin LED 4 of PCA9685PW chip is used to control the blue light of RGB;...
  • Page 63 Source Code Note: before setting the test code, you need to add the libraries. Follow the instructions below: Open the micro:bit Software MakeCode editor https://makecode.micro:bit.org/ Click to add “New Project”, then you will see the interface below:...
  • Page 64 Then click Advanced, find the Extensions to add file.
  • Page 65 Enter https://github.com/jdarling/pxt-pca9685 and search.
  • Page 66 Then you will get the pca9685 below:...
  • Page 67 Click the pca9685 to download the extension:...
  • Page 68 Finally you should see the PCA9685 project is added successfully.
  • Page 69 Test code 1:...
  • Page 70 Test code 2:...
  • Page 71 What will you see Send well the test code 1 to micro:bit main board, then insert the micro:bit main board into the micro:bit robot shield. Connect a 18650 battery to the shield, and turn the POWER switch ON. The two RGB LEDs on the robot shield flash in three colors, red, green and blue.
  • Page 72: Light Sensing

    Light Sensing Description The micro:bit robot shield comes with a photocell sensor element controlled by P1 interface. Photo resistor (Photovaristor) is a resistor whose resistance varies with different incident light strength. In the project, we will use the photocell sensor to detect the ambient light intensity, controlling the color brightness of 18 WS2812 LEDs on the KEYES-2812-18R module.
  • Page 73 Source Code Note: here involves KEYES-2812-18R RGB module. Before setting the test code, you need to add the libraries. Follow the instructions mentioned above (RGB Light Cycle)
  • Page 74 What will you see Send well the test code to micro:bit main board, then insert the micro:bit main board into the micro:bit robot shield. Connect a 18650 battery to the shield, and turn the POWER switch ON. The 18 WS2812 LEDs are turned on. The darker the light intensity, the brighter the white light.
  • Page 75: Motor Driving

    Motor Driving Description The micro:bit robot shield has built-in PCA9685PW and TB6612FNG chips. To save the IO port resources, we can control the TB6612FNG chip through PCA9685PW chip; then control the moving direction and speed of two DC motors by TB6612FNG chip. Pin LED1 and LED2 of PCA9685PW chip are separately used to control the direction and speed of the left motor;...
  • Page 76 When the front number are set to 0, motor turns forward; set to 100, motor turns reverse. In the code, LED2 and LED4 are setting the motor’s speed, in the range of 0-100. The greater the value, the faster the speed. Below table is the running status settings of Micro:bit robot:...
  • Page 77 control control control control direction of speed of Left direction of speed of Right state left motor left motor motor right motor right motor motor (LED1) (LED2) (LED3) (LED4) Turn Turn Forward forward forward Turn Turn Backward backward backward Stop Stop Stop Turn...
  • Page 78 Source Code Note: here need to drive PCA9685PW chip. Before setting the test code, you need to add the libraries. Follow the instructions mentioned above (RGB Light Test)
  • Page 79 What will you see Send well the test code to micro:bit main board, then insert the micro:bit main board into the robot shield, and connect a 18650 battery. Turn the POWER switch ON. The micro:bit robot will go forward for 2 seconds, backward for 2 seconds, stop for 1 seconds, turn left for 1 second and turn right for 1 second, circularly and repeatedly.
  • Page 80: Line Tracking Robot

    Line Tracking Robot...
  • Page 81: Testing The Tracking Sensor

    Testing the tracking sensor Description The micro:bit robot shield comes with two line tracking sensor elements. Also comes with two potentiometers used for adjusting the sensitivity of sensor. The tracking sensor is actually an infrared sensor. The component used here is the TCRT5000 infrared tube. Its working principle is to use the different reflectivity of infrared light to the color, then convert the strength of the reflected signal into a current signal.
  • Page 83 Source Code...
  • Page 84 What will you see Send the test code to micro:bit main board, then insert the micro:bit main board into the robot shield; connect a 18650 battery; then turn the POWER switch ON. When the left tracking sensor detects an obstacle, the micro:bit LED matrix will showⅠat the left side;...
  • Page 85: How To Build A Line Tracking Robot

    How to Build a Line Tracking Robot? Overview In the previous projects, we have introduced the principle and application of line tracking sensor and motor driving. We’re now ready to give the Micro:bit robot an upgraded capability - Line tracking! What is line tracking? Line tracking is exactly what it sounds like - following the track.
  • Page 86 That is why the micro:bit car can automatically follow the black track, achieving the automatic line tracking function. Programming Thinking Set the KEYES-2812-18R module to turn on 18 RGB LEDs in various colors. Judge white and black line by both side line tracking sensors. If right side tracking sensor detects black line, robot turns right;...
  • Page 88 What will you see Send the test code to micro:bit main board, then insert the micro:bit main board into the car shield; connect a 18650 battery, and turn the POWER switch ON. The micro:bit robot will move forward along the black track. Note: 1) The width of black track should be greater than the distance between the two tracking sensors.
  • Page 89: Ultrasonic Following Robot

    Ultrasonic Following Robot...
  • Page 90: Ultrasonic Ranging

    Ultrasonic Ranging Description There is an animal called bat in nature. The bats can fly at night, not depend on its eyes, but on its ears and vocal organs. When the bat flies, it will emit a scream, an ultrasonic signal that humans cannot hear because of its high audio frequency.
  • Page 91 Ultrasonic sensor has a wide range of sensitivity, no blind area, and no interference with obstacles. As the following picture shown, it is our keyestudio ultrasonic module. It has two something like eyes. One is transmitting end, the other is receiving end.
  • Page 93 When using it: (1) Use IO trigger ranging, at least 10us HIGH level signal; that is, first pull the Trip Low, then give a HIGH level signal of 10us. (2) The module automatically sends eight square waves of 40khz to automatically detect whether there is a signal return back;...
  • Page 94 Source Code:...
  • Page 95 Open the Arduino IDE, select the proper board and COM port; then open serial monitor and set the baud rate to 115200, the measured distance value will print out on the monitor window. Here you can click the link below to get more use details of Arduino IDE. https://wiki.keyestudio.com/Ks0001_keyestudio_UNO_R3_BOARD...
  • Page 97: How To Build An Ultrasonic Following Robot

    How to Build an Ultrasonic Following Robot? Overview In the previous project, we have introduced how to build an obstacle following robot. This project we use an ultrasonic module combined with micro:bit robot shield to build an ultrasonic obstacle following robot. How does it work? The principle is very simple.
  • Page 98 Set the KEYES-2812-18R module to turn on 18 RGB LEDs in various colors. When micro:bit robot moves forward, 18 RGB LEDs turn on blue light; robot moves backward, 18 RGB LEDs turn on purple light; robot stops, 18 RGB LEDs turn on red light. Measure the distance between the robot and obstacles using an ultrasonic sensor.
  • Page 100 What will you see Send the test code to micro:bit main board, then insert the micro:bit main board into the robot shield and connect a 18650 battery; Turn the POWER switch ON. The 18 RGB LEDs on the KEYES-2812-18R module will emit different colors. The micro:bit robot will follow along the front object.
  • Page 101: Obstacle Avoiding And Following Robot

    Obstacle Avoiding Following Robot...
  • Page 102: Infrared Avoiding Obstacles

    Infrared Avoiding Obstacles Overview The micro:bit robot shield comes with two infrared obstacle avoidance sensors. It is actually designed for infrared obstacle avoidance robot. The infrared obstacle detector sensor has a pair of infrared transmitting and receiving tubes. The transmitter emits an infrared rays of a certain frequency. When the detection direction encounters an obstacle (reflecting surface), the infrared rays are reflected back, and receiving tube will receive it.
  • Page 104 Programming Thinking Set the control pin of left infrared obstacle avoiding sensor to P2; the right one set to P11. Measure the HIGH/LOW level of both sensors’ control end. Obstacle detected, signal end LOW; no obstacle, signal end HIGH. Judge whether there is obstacles according to the level feedback of sensor’s signal end; make the micro:bit LED matrix show the patterns.
  • Page 106 What will you see Send the source code to micro:bit main board, then insert the micro:bit main board into the robot shield and connect a 18650 battery; turn the POWER switch ON. The two infrared obstacle detector sensors on the micro:bit robot shield can detect an obstacle ahead. ...
  • Page 107: How To Build An Obstacle Avoiding Robot

    How to Build an Obstacle Avoiding Robot? Overview This project you will learn how to combine an ultrasonic module, infrared obstacle sensor and micro:bit robot shield to build an ultrasonic obstacle avoiding robot. How does it work? The principle is very simple. We will use an ultrasonic module to measure the distance between the micro:bit robot and an obstacle ahead.
  • Page 108 forward, 18 RGB LEDs turn on blue light; robot moves backward, 18 RGB LEDs turn on red light; turn left, 18 RGB LEDs turn on purple light; turn right, 18 RGB LEDs turn on yellow light. Measure the distance between the robot and obstacles using an ultrasonic sensor. When the measured distance is greater than 10cm, make use of infrared sensors to detect obstacle at both sides: If no detecting obstacles at both sides, robot moves forward;...
  • Page 109 Source Code...
  • Page 110 What will you see Send the test code to micro:bit main board, then insert the micro:bit main board into the robot shield and connect a 18650 battery; Turn the POWER switch ON. The micro:bit robot is ready to avoid an obstacle ahead to move freely.
  • Page 111: How To Build An Object Following Robot

    How to Build an Object Following Robot? Overview In the previous project, we have built an ultrasonic following robot combined with ultrasonic module and robot bottom shield. But the robot can’t turn around, only follow in a straight line. We’re now ready to give the Micro:bit robot another upgraded capability - Object Following! Combine ultrasonic module, infrared detector sensor and robot shield to build an obstacle following robot that can turn around.
  • Page 112 Programming Thinking Set the KEYES-2812-18R module to turn on 18 RGB LEDs in various colors. When micro:bit robot moves forward, 18 RGB LEDs turn on blue light; robot moves backward, 18 RGB LEDs turn on purple light; turn left, 18 RGB LEDs turn on green light; turn right, 18 RGB LEDs turn on yellow light;...
  • Page 113 Source Code...
  • Page 114 What will you see Send the test code to micro:bit main board, then insert the micro:bit main board into the robot shield and connect a 18650 battery; Turn the POWER switch ON. The micro:bit robot will follow the front object straight or turn around.
  • Page 115 Infrared Control Robot...
  • Page 116: Infrared Remote Control

    Infrared Remote Control Overview IR Remote Control Decoding: There is no doubt that infrared remote control is commonly seen in our daily life. It's hard to imagine our world without it. An infrared remote control can be used to control a wide range of home appliances such as television, audio, video recorders and satellite signal receivers.
  • Page 117 That is, consist of an infrared remote control, an infrared receiver module and a microcontroller that can decode. You can refer to the figure below. The 38K infrared carrier signal transmitted by an infrared remote controller is encoded by an encoding chip inside the remote controller.
  • Page 118 pressed on the remote control. When press down a button on the remote control, it will send out an infrared carrier signal. And when infrared receiver receives that signal, its program will decode the carrier signal, and through different data codes, thus can judge which key is pressed.
  • Page 119 1) Operating Voltage: 3.3-5V(DC) 2) Output Signal: Digital signal 3) Receiving Angle: 90 degrees 4) Frequency: 38khz 5) Receiving Distance: 18m...
  • Page 120 Source Code Note: before setting the test code, you need to add the libraries. Follow the instructions below: Open the micro:bit Software MakeCode editor https://makecode.micro:bit.org/ Click to add “New Project”, then you will see the interface below:...
  • Page 121 Then click Advanced, find the Extensions to add file.
  • Page 122 Enter https://github.com/jhlucky/maqueen and search.
  • Page 123 Then you will get the maqueen file below:...
  • Page 124 Click the maqueen file to download the extension:...
  • Page 125 Finally you should see the maqueen project is added successfully.
  • Page 126 Code:...
  • Page 127 Open the Arduino IDE, select the proper board and COM port; then open serial monitor and set the baud rate to 115200, the measured distance value will print out on the monitor window. Here you can click the link below to get more use details of Arduino IDE. https://wiki.keyestudio.com/Ks0001_keyestudio_UNO_R3_BOARD...
  • Page 130 We have listed out the key value of infrared remote control. See the figure below:...
  • Page 131: How To Build An Infrared Remote Control Robot

    How to Build an Infrared Remote Control Robot? Overview How to built an infrared remote control robot? Think about it. We can build a line tracking robot combined with tracking sensor and robot shield in the above project. So in this circuit, you can combine an infrared remote control and robot shield to build an infrared remote control robot.
  • Page 132 Source Code...
  • Page 133 Test Result: Send the test code to micro:bit main board, then insert the micro:bit main board into the robot shield and connect a 18650 battery; Turn the POWER switch ON. Aimed at the infrared receiver head, press the button on the infrared remote controller, it can control the micro:bit robot go front, back, turn right or turn left and stop.
  • Page 134 Key on IR remote control Robot status Move forward Move backward Turn left Turn right stop...
  • Page 135 Bluetooth Control Robot...
  • Page 136: Andriod Bluetooth Controlling Robot

    Andriod Bluetooth Controlling Robot Overview: The micro:bit main board comes with Bluetooth module. Communicate built-in Bluetooth module with your mobile phone; then use Bluetooth APP to control the external devices connected to micro:bit main board. The built-in Bluetooth module can support both Andriod and IOS system. But the use method is different. In this project, you will learn how to connect the Bluetooth module in Andriod system so as to drive the robot move.
  • Page 137 Adding Code libraries: Note: before setting the test code, you need to add the libraries. Follow the instructions below: Connect the micro:bit main board to your computer using a USB cable. Open the micro:bit Software MakeCode editor https://makecode.micro:bit.org/ Click to add “New Project”, then you will see the interface below:...
  • Page 139 Then click Advanced, find the Extensions to add file.
  • Page 140 Then click the Bluetooth.
  • Page 141 Select Remove extensions and add Bluetooth.
  • Page 142 Finally, you should see the Bluetooth is added well.
  • Page 143 Then click the Extensions again, enter the library link below and search: https://github.com/LaboratoryForPlayfulComputation/pxt-BlockyTalkyBLE-UART...
  • Page 144 Finally, you should see the library blocky Talky BLE is added successfully.
  • Page 145 Source Code: Right click the source code to send to micro:bit main board.
  • Page 146 Using Bluetooth APP: Send the above source code to the micro:bit main board; then power on the micro:bit main board Click the link to download the Bluetooth APP: https://drive.google.com/open?id=1u_wXlpuRjcChpCcVPcIha4yWYWhefhW2 Installed well the Bluetooth APP, click the icon to open the APP. Once your phone detects Bluetooth module on micro:bit main board, the APP will prompt to open the Bluetooth.
  • Page 147 No connecting the Bluetooth APP, Micro:bit main board will show a smile face on the LED matrix. Then click the Bluetooth icon , it will pop up the micro:bit Bluetooth interface.
  • Page 148 Then click to connect the micro:bit Bluetooth. Bluetooth connected, you will see the LED matrix on the Micro:bit main board showing a heart image.
  • Page 149 Icon Function Bluetooth Disconnect Bluetooth Connect Bluetooth Button control Long press to operate; release to stop; Arrow for controlling the robot’s moving direction. Voice control Speak “go、 back、 left、 right、 stop” towards your Andriod phone to control the robot status. Gravity sensing control system Check out the angle value of your phone on the APP...
  • Page 150 Test Result: Send well the test code to micro:bit main board; insert the micro:bit main board into robot shield; turn power switch on. Follow method mentioned above, connect the Bluetooth on the micro:bit main board using Bluetooth APP. Bluetooth connected, click the icons on the APP to randomly control the micro:bit robot running.
  • Page 151: Ios Bluetooth Wireless Programming And Control

    IOS Bluetooth Wireless Programming and Control This section will introduce how to use wireless programming and control in IOS devices (ipad/iPhone). Use Method is follows: Step 1: Open the App store on your ipad/iPhone. Step 2: Search the micro:bit to download and install.
  • Page 153 Pay close attention to: Connect your micro:bit main board Open micro:bit Software MakeCode editor https://makecode.micro:bit.org/, click the icon , select the Project Settings and no pairing required.
  • Page 155 Step 3: open the micro:bit interface, click Choose micro:bit.
  • Page 156 Then click Pair a micro:bit, and click Next.
  • Page 157 Step 4: power on the micro:bit main 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.
  • Page 158 Step 5: copy the pattern from your micro:bit device and tap Next.
  • Page 159 Continue to tap Next to pair.
  • Page 160 OK, pairing successful!
  • Page 161 Step 6: now go to control robot; press the reset button on the micro:bit main board; then tap Create Code on the micro:bit APP.
  • Page 162 Step 7: open the Microsoft MakeCode for micro:bit, click the icon , select to open the Project Settings.
  • Page 163 Then you will see the interface below. Close the option2 (JustWorks pairing...) and open option1(No Pairing Required...)
  • Page 164 Step 8: write the code...
  • Page 165 Wrote well, click the triangle icon at the bottom left to change the name; then click to save the code.
  • Page 166 Step 9: go to the Flash interface, click the blue bar to flash code to micro:bit. Wait the process complete.
  • Page 167 OK. Flashing successful!
  • Page 168: How To Build Ios Bluetooth Control Robot

    How to Build IOS Bluetooth Control Robot In the previous section, you have learned the knowledge of IOS Bluetooth wireless programming and control. Now let’s move on to build an IOS Bluetooth control robot. The method is almost the same. We have packaged all the source code.
  • Page 169 Source Code:...
  • Page 170 Use Method is follows: Step 1: Right click the source code to send to micro:bit main board. Step 2: Open the App store on your ipad/iPhone. Search the micro:bit to download and install.
  • Page 171 Pay close attention to: Connect your micro:bit main board Open micro:bit Software MakeCode editor https://makecode.micro:bit.org/, click the icon , select the Project Settings and no pairing required.
  • Page 173 Step 3: open the micro:bit interface, click Choose micro:bit.
  • Page 174 Then click Pair a micro:bit, and click Next.
  • Page 175 Step 4: power on the micro:bit main 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.
  • Page 176 Step 5: copy the pattern from your micro:bit device and tap Next.
  • Page 177 Continue to tap Next to pair.
  • Page 178 OK, pairing successful!
  • Page 179 Step 6: now go to control the robot; press the reset button on the micro:bit main board; then tap Monitor and Control on the micro:bit APP.
  • Page 180 Step 7: Tap the Add and then select the Gamepad.
  • Page 181 And you should see the control interface shown below. Click Start to connect.
  • Page 182 Connection successful! Click Stop to disconnect.
  • Page 183 Test Result Press key A, robot goes front; Press the key B, go back; Press key C, turn left; Press key D, turn right; Press Stop to disconnect the Bluetooth, robot will stop. Press key 1, robot stops; Press key 2, robot stops to turn left 180°...
  • Page 184: Related Resources Link

    Related Resources Link You can download all the information needed from the link below: https://drive.google.com/open?id=1vxESHAOWctadONe-8mImSPYi-JEEGE9g Download the micro:bit driver: https://drive.google.com/open?id=18g1tebO73kpHDqohhP2WWjmrWO7MvvrZ Download the Bluetooth APP: https://drive.google.com/open?id=1u_wXlpuRjcChpCcVPcIha4yWYWhefhW2 Download the User Guide: https://drive.google.com/open?id=1NESb2BdathiVVst6NxrqaOW4PrFYmQNk Download all the source code: https://drive.google.com/open?id=1qR3848mxxGU6VxxUKncL0UGYEdawzlP6...

Table of Contents