291
Import Hex profile (How to import?) , or click
“
New Project
”
and drag
blocks step by step(add MecanumRobot extension library first)
(How to add MecanumRobot extension?)
(5)Test Code:
File Type
Path
File Name
Hex file KS4031(4032) folder/Makecode
Tutorial/Makecode Code/Project
18.1
:
Ultrasonic Ranging.hex
Project 18.1
:
Ultrasonic Ranging.hex
Or you could edit code step by step in the editing area.
(1)Tap
“
Advanced
”→“
Serial
”
→“
serial redirect to USB
”
Combine it with
“
on start
”
block
(2)Click
“
Advanced
”
→
“
Serial
”
to find and drag
“
serial write value x=0
”
into
“
forever
”
; Click
“
MecanumRobot
”
to find and drag
“
Ultrasonic
”
to the
Содержание Keyestudio 4WD Mecanum Robot Car
Страница 21: ...21 Installation Diagram Prototype Part 2 ...
Страница 22: ...22 Components Needed Installation Diagram ...
Страница 23: ...23 Prototype Part 3 ...
Страница 24: ...24 Components Needed Installation Diagram ...
Страница 26: ...26 Components Needed Installation Diagram mind the installation direction ...
Страница 27: ...27 Prototype Part 5 Components Needed ...
Страница 28: ...28 Installation Diagram Prototype Part 6 ...
Страница 29: ...29 Components Needed Installation Diagram ...
Страница 30: ...30 Prototype Part 7 Components Needed ...
Страница 31: ...31 Installation Diagram mind the direction of the motor Prototype Part 8 ...
Страница 32: ...32 Components Needed Installation Diagram Pay attention to the installation direction of the mecanum wheel ...
Страница 33: ...33 Prototype Part 9 Components Needed ...
Страница 34: ...34 Installation Diagram Prototype Part 10 ...
Страница 35: ...35 Components Needed Installation Diagram ...
Страница 36: ...36 Prototype Start Wiring The wiring of the RGB lights ...
Страница 37: ...37 The wiring of the infrared receiver module The wiring of the motor and colorful lights ...
Страница 38: ...38 The wiring of the line tracking sensor The wiring of the ultrasonic sensor ...
Страница 39: ...39 The wiring of the servo The wiring of the M1 motor ...
Страница 40: ...40 The wiring of the M2 motor The wiring of the M3 motor ...
Страница 41: ...41 The wiring of the M4 motor The wiring of the power supply the 5V is connected to the shield ...
Страница 45: ...45 ...
Страница 47: ...47 ...
Страница 50: ...50 You can also directly drag the hex file onto the MICROBIT E disk ...
Страница 56: ...56 Click Next ...
Страница 57: ...57 Click another Next ...
Страница 59: ...59 in the folder we provided in the link https fs keyestudio com KS4031 4032 Click Done to finish the pairing ...
Страница 60: ...60 ...
Страница 66: ...66 ...
Страница 67: ...67 ...
Страница 69: ...69 Click the Explorer on the left side ...
Страница 73: ...73 Click Import File ...
Страница 74: ...74 Select Makecode Code Project 1_ Heart beat Project 1_ Heart beat hex Then click Go ahead ...
Страница 88: ...88 block ...
Страница 93: ...93 Complete Program ...
Страница 99: ...99 leave it below clear screen block Complete Program ...
Страница 105: ...105 3 Copy once and set to on button A B pressed and show string AB Complete Code ...
Страница 116: ...116 Complete Program ...
Страница 120: ...120 ...
Страница 121: ...121 ...
Страница 122: ...122 ...
Страница 135: ...135 A Go to Basic show leds B Lay it down beneath block then click show leds and the pattern appears ...
Страница 140: ...140 ...
Страница 149: ...149 Replicate code string for 3 times and keep them into forever block separately set the whole code string as follows ...
Страница 159: ...159 A Click Basic pause ms 100 B Lay it down into forever and set to 100ms Complete Program ...
Страница 163: ...163 Project 9 Speaker ...
Страница 166: ...166 forever block Click the little triangle to select happy hello yawn ...
Страница 167: ...167 Complete Program Select JavaScript and Python to switch into JavaScript and Python language code ...
Страница 173: ...173 side of 0 0 and change the 0 on the right side to 1000 Complete Program ...
Страница 183: ...183 Complete Program Select JavaScript and Python to switch into JavaScript and Python language code ...
Страница 184: ...184 ...
Страница 189: ...189 ...
Страница 190: ...190 ...
Страница 192: ...192 Secondly click Pair a new micro bit ...
Страница 194: ...194 ...
Страница 195: ...195 ...
Страница 197: ...197 A few seconds later the match is done and the LED dot matrix displays the pattern ...
Страница 198: ...198 ...
Страница 200: ...200 ...
Страница 201: ...201 ...
Страница 202: ...202 Name the code as 1 and click to save it ...
Страница 204: ...204 ...
Страница 205: ...205 ...
Страница 211: ...211 Code 2 File Type Path File Name ...
Страница 218: ...218 Complete Code ...
Страница 219: ...219 ...
Страница 225: ...225 Complete Code ...
Страница 227: ...227 ...
Страница 230: ...230 Click JavaScript to switch into the corresponding JavaScript code ...
Страница 235: ...235 Click Neopixel to move strip show block under pause as 500 ...
Страница 236: ...236 Complete Code ...
Страница 244: ...244 Copy once and change the of to Complete Program ...
Страница 249: ...249 Back ...
Страница 250: ...250 ...
Страница 258: ...258 Click JavaScript to view the corresponding JavaScript code ...
Страница 271: ...271 8 Click Basic to find and drag show leds to the second then Click the blocks to form pattern ...
Страница 272: ...272 9 Copy LL 1 and RR 0 once and place it to else if and change the first number 1 behind LL to 0 ...
Страница 273: ...273 10 Click Basic to find and drag show leds to the third else Click these blocks to form the pattern ...
Страница 274: ...274 11 Click Basic to find and drag show leds to else Click these blocks to form the pattern ...
Страница 275: ...275 Complete Program ...
Страница 282: ...282 ...
Страница 284: ...284 Complete Program ...
Страница 286: ...286 ...
Страница 296: ...296 ...
Страница 304: ...304 9 Copy once Change the 180 to 0 distance_l to distance_r and others remain unchanged ...
Страница 307: ...307 12 Change to and place it in the first else ...
Страница 308: ...308 11 Click Funtionsto of Advance to find and drag and place it to the second else ...
Страница 309: ...309 Complete Program ...
Страница 310: ...310 ...
Страница 311: ...311 Click JavaScript to view the corresponding JavaScript code ...
Страница 318: ...318 6 change the 10 to 20 car_back to car stop 7 change the 20 to 40 car stop to car forward ...
Страница 319: ...319 Place car stop to the last else Complete Program ...
Страница 320: ...320 Click JavaScript to view the corresponding JavaScript code ...
Страница 331: ...331 The key value is displayed as for your reference ...
Страница 332: ...332 19 2 IR Remote Control ...
Страница 339: ...339 9 Click Functions of Advance to find and drag 指 to the second then ...
Страница 340: ...340 10 Copy val2 70 once and place it behind the first if change the 70 ...
Страница 341: ...341 behind to 68 11 Click Functions of Advance to find and drag to the ...
Страница 345: ...345 Complete Program ...
Страница 355: ...355 ...
Страница 362: ...362 ...
Страница 366: ...366 ...
Страница 367: ...367 Click JavaScript to view the corresponding JavaScript code ...