background image

45

www.keyestudio.com

2) TECH SPECS:

Operating Voltage: 5V

DC

Operating Current: 15mA

Operating Frequency: 40khz

Maximum Detection Distance: 3-5m

Minimum Detection Distance: 3-4cm

Sensing Angle: less than 15 degrees

3) Test Code

Summary of Contents for Micro:bit Mini Smart Robot Car

Page 1: ...Keyestudio Micro bit Mini Smart Robot Car...

Page 2: ...lation Method 5 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 11 Step 4 Play It 12 7 micro bit Pins 14 8 Learning Projects 19 8...

Page 3: ...8 5 2 Ultrasonic Obstacle Avoiding Car 50 8 6 Infrared Avoiding Obstacles 55 8 6 1 Infrared Detection 55 8 6 2 Infrared Obstacle Avoiding Car 63 8 7 Ultrasonic and Infrared Avoiding Obstacles 67 8 8 B...

Page 4: ...wing Also comes with a passive buzzer for playing music Moreover supply the power by 18650 batteries supporting charge when run out of power You will be able to adjust the motor speed This micro bit r...

Page 5: ...mm 6 Environmental attributes ROHS 3 Packing List No Item Quantity Image 1 Micro bit main board 1 2 keyestudio Micro bit smart robot shield Black and Eco friendly 1 3 Keyestudio line tracking sensor B...

Page 6: ...sor 1 5 JST PH2 0MM 5PIN double head cable length 55MM 1 6 W420 steel universal wheel 1 7 18650 red battery 3500mah self prepare 1 8 N20 motor wheel diameter 43mm width 19mm hole diameter 3mm type D A...

Page 7: ...ated nut 2 10 Single pass M3 6mm 6mm hex copper pillar 2 11 M3 6MM round head screw 2 12 yellow black handle 3 40MM phillips screwdriver 1 13 USB cable A MICRO OD 4 0 Black with magnetic spring L 1 2m...

Page 8: ...5 4 Installation Method a Firstly prepare all the assembly components Place them together before install the micro bit robot car...

Page 9: ...The first step should mount 2pcs hex copper pillar and 2pcs M3 Nickel plated nut on the front of car shield c Connect the JST PH2 0MM 5PIN double head cable to line tracking sensor Front view Back vi...

Page 10: ...7 d Then fix the line tracking sensor and W420 steel universal wheel onto the hex copper pillar on the car shield using 2pcs M3 6MM round head screws...

Page 11: ...8...

Page 12: ...9...

Page 13: ...10 e After that mount the 2pcs N20 motor wheels into the DC motor...

Page 14: ...11...

Page 15: ...12 f Now we insert the ultrasonic sensor and micro bit main board into the car shield...

Page 16: ...13...

Page 17: ...14 g Connect the JST PH2 0MM 5PIN cable connected to line tracking sensor to the car shield...

Page 18: ...15 h Finally insert the 18650 battery into the car shield i Congrats The mini micro bit robot car is installed well Pretty simple...

Page 19: ...on 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 cli...

Page 20: ...2...

Page 21: ...3 3 After that click Next to continue the installation...

Page 22: ...4 4 Wait the driver installing finished...

Page 23: ...5 5 Completing the driver installation...

Page 24: ...6 6 Driver installation completed then you can right click the Computer Properties Device Manager...

Page 25: ...7 You can check the detailed Ports information shown as below...

Page 26: ...8 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 27: ...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 Show...

Page 28: ...10 Click the JavaScript you can see the corresponding program code Shown as below figure...

Page 29: ...load 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 Sa...

Page 30: ...st 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...

Page 31: ...13 You can power it using USB cable or battery The battery holder should connect two 1 5V AA batteries...

Page 32: ...he 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 There are five large pins that are also connected to holes in the boa...

Page 33: ...15 www keyestudio com...

Page 34: ...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 guid...

Page 35: ...17 www keyestudio com...

Page 36: ...18 www keyestudio com...

Page 37: ...ctrified A passive buzzer does not have such a source so DC signal cannot drive it beep Instead you need to use square waves whose frequency is between 2K and 5K to drive it Different frequencies prod...

Page 38: ...20 www keyestudio com In the experiment we make use of the software built in library to drive the passive buzzer play a song of Happy Birthday...

Page 39: ...21 www keyestudio com 2 Test Code...

Page 40: ...t 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 mi...

Page 41: ...5 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 show...

Page 42: ...24 www keyestudio com...

Page 43: ...w keyestudio com 3 Test Result 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 repea...

Page 44: ...G chip When using you just need to insert the micro bit main board into the shield and send the test code to micro bit main board Insert well the 18650 battery into the shield to control the two motor...

Page 45: ...P0 Left motor Right motor control pin P16 state PWM P1 Right motor Forward 1 500 Go forward 1 500 Go forward Backward 0 500 Go backward 0 500 Go backward Stop 0 0 Stop 0 0 Stop Turn left 0 500 Go back...

Page 46: ...28 www keyestudio com 2 Test Code...

Page 47: ...then insert the micro bit main board into the car shield and connect a 18650 battery into the car shield Turn the POWER switch ON The micro bit car will go forward for 3 seconds backward for 3 seconds...

Page 48: ...fferent reflectivity of infrared light to the color then convert the strength of the reflected signal into a current signal During the process of detection black is active at LOW level but white is ac...

Page 49: ...31 www keyestudio com...

Page 50: ...32 www keyestudio com 2 TECH SPECS Operating Voltage 3 3 5V DC Interface 5Pin connector Output Signal digital signal 3 Test Code...

Page 51: ...33 www keyestudio com...

Page 52: ...18650 battery turn the POWER switch ON At this moment the micro bit LED matric has no display But if approach your finger to the first tracking sensor S1 the LED matrix will show in the middle Approac...

Page 53: ...35 www keyestudio com...

Page 54: ...36 www keyestudio com...

Page 55: ...37 www keyestudio com...

Page 56: ...ow the line trajectory You might often see some robots always follow or track a black line How does it work It uses the tracking sensor to detect the black track on the pavement and detection signal w...

Page 57: ...ward 2 If the middle tracking sensor does not detect a black line then judge the sensor on both sides If the left sensor detects a black line but the right sensor doesn t the micro bit car will turn l...

Page 58: ...40 www keyestudio com...

Page 59: ...ro bit main board into the car shield and connect a 18650 battery turn the POWER switch ON At this moment the micro bit mini robot car will follow a black line Special Note When testing the car do not...

Page 60: ...42 www keyestudio com...

Page 61: ...rs 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 If these ultrasonic signals hit other objects on the fligh...

Page 62: ...are reflected back the ultrasonic module outputs an echo signal so it can determine the distance of object from the time difference between trigger signal and echo signal Ultrasonic sensor has a wide...

Page 63: ...estudio com 2 TECH SPECS Operating Voltage 5V DC Operating Current 15mA Operating Frequency 40khz Maximum Detection Distance 3 5m Minimum Detection Distance 3 4cm Sensing Angle less than 15 degrees 3...

Page 64: ...46 www keyestudio com...

Page 65: ...N At this moment when the micro bit mini robot car detects an obstacle ahead the measured result will be showed on the micro bit LED matrix If the measured distance between an obstacle and ultrasonic...

Page 66: ...48 www keyestudio com...

Page 67: ...49 www keyestudio com...

Page 68: ...g car Here we combine a ultrasonic module and micro bit car shield to build an ultrasonic obstacle avoiding car How does it work We have introduced the principle of ultrasonic module before We can use...

Page 69: ...e between the micro bit car and an obstacle ahead 2 When the measured distance is less than 10cm the micro bit car stops for 0 2 second then turns left for 0 5 second and then goes forward If the meas...

Page 70: ...52 www keyestudio com...

Page 71: ...o micro bit main board then insert the micro bit main board into the car shield and connect a 18650 battery turn the POWER switch ON At this moment if the micro bit robot car encounters an obstacle ah...

Page 72: ...54 www keyestudio com...

Page 73: ...tter 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 At thi...

Page 74: ...56 www keyestudio com almost 10cm...

Page 75: ...57 www keyestudio com 2 Test Code...

Page 76: ...detect an obstacle ahead If the infrared sensors on both side do not detect an obstacle the LED matrix will show a big heart image If the infrared sensors on both side detect an obstacle the LED matr...

Page 77: ...59 www keyestudio com...

Page 78: ...60 www keyestudio com...

Page 79: ...61 www keyestudio com...

Page 80: ...62 www keyestudio com...

Page 81: ...or driving circuit on the micro bit car shield to build an infrared obstacle avoiding car How does it work We have introduced the principle of infrared obstacle detector module before We can make use...

Page 82: ...second 2 If detects an obstacle on the right side but not on the left side the car will turn left for 0 1 second 3 If detects no obstacle at both sides the car will go forward 4 If detects obstacles a...

Page 83: ...65 www keyestudio com...

Page 84: ...ensor on the car shield detects an obstacle the car will turn right at a certain angle and then go forward The right infrared sensor on the car shield detects an obstacle the car will turn left at a c...

Page 85: ...sors to build an obstacle avoiding car 2 Programming Thinking 1 When the distance between the car and front obstacle is less than or equal to 10cm the robot car will stop passive buzzer beeps for 0 5...

Page 86: ...an obstacle on the right side but not on the left side the car will turn left If detects no obstacle at both sides the car will go forward If detects obstacles at both sides the car will stop passive...

Page 87: ...69 www keyestudio com...

Page 88: ...If detects an obstacle on the right side but not on the left side the car will turn left at a certain angle then go forward If detects no obstacle at both sides the car will go forward If detects obst...

Page 89: ...71 www keyestudio com a certain angle and then goes forward...

Page 90: ...ilt in Bluetooth module to communicate with your phone s APP thus control the external devices connected to micro bit control board using APP In the experiment we only use the phone s APP to control t...

Page 91: ...luetooth module Before sending the test code we should add the library to micro bit on the browser The method is as below Connect the micro bit main board to your computer using a USB cable Open micro...

Page 92: ...74 www keyestudio com...

Page 93: ...75 www keyestudio com Then click the Bluetooth TAP Remove extensions and add Bluetooth...

Page 94: ...76 www keyestudio com...

Page 95: ...77 www keyestudio com Finally you should see the Bluetooth is added well...

Page 96: ...78 www keyestudio com Then click the Extensions again enter the library link below and search https github com LaboratoryForPlayfulComputation pxt BlockyTalkyBLE UART...

Page 97: ...79 www keyestudio com Finally you should see the library blocky Talky BLE is added successfully...

Page 98: ...80 www keyestudio com 3 Test Code...

Page 99: ...81 www keyestudio com 4 Bluetooth APP Use After add the library and send the test code to micro bit main board power on the micro bit main board...

Page 100: ...ive google com open id 17jJB GKxPytDyPuqqhs6B2NUCCu7kST Installed the APP click the APP icon to open it When your phone detects the Bluetooth module on the micro bit main board the APP will prompt to...

Page 101: ...83 www keyestudio com Then click the Bluetooth icon it will pop up the micro bit information...

Page 102: ...84 www keyestudio com Then click to connect the micro bit Bluetooth...

Page 103: ...85 www keyestudio com After that click for connection pop up the interface shown below...

Page 104: ...86 www keyestudio com Here the Bluetooth is connected successfully you can use the APP to control your micro bit car The options are shown on the right side...

Page 105: ...87 www keyestudio com You can click the to disconnect the Bluetooth Shown below...

Page 106: ...main board and power on the micro bit main board Follow the method mentioned above connect the Bluetooth on the micro bit main board using your phone s APP Connected click the right icons on the APP...

Page 107: ...89 www keyestudio com...

Page 108: ...e to build a Bluetooth controlling car How does it work Connect well the Bluetooth module using phone s APP when the Bluetooth module receives the characters sent by APP it will control the motion sta...

Page 109: ...the car forward if click back it will send the char B controlling the car backward if click left it will send the char L controlling the car turn left if click right it will send the char R controlli...

Page 110: ...92 www keyestudio com...

Page 111: ...ld and connect a 18650 battery turn the POWER switch ON When your phone s APP is connected to Bluetooth module the built in LED matrix on the micro bit main board should show the heart shape If connec...

Page 112: ...94 www keyestudio com...

Page 113: ...io com 8 8 3 Wireless Gamepad Control Description Apart from the Andriod APP controlling Bluetooth mentioned above you can also control the micro bit through IOS Bluetooth wireless programming and con...

Page 114: ...96 www keyestudio com...

Page 115: ...97 www keyestudio com Pay close attention to When open the MakeCode Editor click the icon select the project settings shown below...

Page 116: ...98 www keyestudio com...

Page 117: ...99 www keyestudio com How to control the car through IOS Bluetooth programming Step 1 Open the App store on your ipad iPhone Step 2 Search the micro bit to download and install...

Page 118: ...100 www keyestudio com...

Page 119: ...101 www keyestudio com Step 3 open the micro bit interface click Choose micro bit...

Page 120: ...102 www keyestudio com Then click Pair a micro bit and click Next...

Page 121: ...com 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...

Page 122: ...104 www keyestudio com Step 5 copy the pattern from your micro bit device and tap Next...

Page 123: ...105 www keyestudio com Continue to tap Next to pair...

Page 124: ...106 www keyestudio com OK pairing successful...

Page 125: ...107 www keyestudio com How to control your micro bit car using the Bluetooth Step 1 press down the RESET button on the micro bit main board Then TAP the Monitor and Control on the APP interface...

Page 126: ...108 www keyestudio com Step 2 Tap the Add and then select the Gamepad...

Page 127: ...109 www keyestudio com And you should see the control interface shown below Click Start to connect...

Page 128: ...110 www keyestudio com Connection successful Click Stop to disconnect...

Page 129: ...yestudio com Test Result When you press the key A the micro bit car goes front press the key B go back press the key C turn left press the key D turn right press Stop disconnect the Bluetooth the car...

Page 130: ...112 www keyestudio com...

Page 131: ...113 www keyestudio com...

Page 132: ...vqGS Download the micro bit driver https drive google com open id 1YbX1_Wjy3IpcEWjqrx0x1CTyJPjToP9d Download the Bluetooth APP https drive google com open id 17jJB GKxPytDyPuqqhs6B2NUCCu7kST Download...

Reviews: