background image

With micro:bit V2, you can use [On Loud Sound] block from [Input] category as 
the trigger for ZOOM:BIT to start dancing; and you can add [Music] blocks too 
to make the performance more lively!

Here’s a FUN challenge for you !

Summary of Contents for ZOOM:BIT

Page 1: ......

Page 2: ... and very soon you will have your own robot car You re also going to learn to code and train ZOOM BIT to perform some tricks to WOW your friends We re sure you will have lots of fun together If you encounter any problem along the way you can reach us on Telegram t me zoombit_support We ll be there to guide you So are you ready Let s start Adam Anna Note from rero EDUteam Cytron ...

Page 3: ...Cheryl Ng SC Lim Suhana Oazmi ...

Page 4: ......

Page 5: ...CONTENT ...

Page 6: ...What s in the Box Quick Start Guidebook Zoom Track REKA BIT with or without micro bit Maker Line Sensor Grove Cable x4 Ultrasonic Sensor LED Module x2 ...

Page 7: ...DC Motor Wheel x2 Screwdriver Screw Nut x4 Castor Double sided Tape x5 Power Data Cable Servo Motor White Rivet x4 Black Rivet x8 Battery Holder AA Battery x4 ...

Page 8: ......

Page 9: ...1 2 3 ...

Page 10: ...4 5 6 The wires should be facing inwards and the notch facing outwards ...

Page 11: ...0 1 7 Wire Connections Clamp the exposed wire lead and not the insulator ...

Page 12: ...8 9 10 ...

Page 13: ...0 1 0 3 11 13 Wire Connections 12 ...

Page 14: ...13 14 ...

Page 15: ...0 1 0 2 0 3 15 16 17 Wire Connections ...

Page 16: ...18 19 20 Wire Connections ...

Page 17: ...21 22 ...

Page 18: ...0 1 0 2 0 3 23 24 25 Wire Connections ...

Page 19: ...0 1 0 2 0 3 26 27 28 Wire Connections ...

Page 20: ...29 30 31 ...

Page 21: ...32 33 34 ...

Page 22: ......

Page 23: ...1 2 ...

Page 24: ...A B C D H I J K L E G F ...

Page 25: ...A B C D E F G H I J K L ...

Page 26: ...3 4 ...

Page 27: ...5 6 ...

Page 28: ...on of your code in MakeCode Editor You will notice that the Hello text only scrolls across the display one time but the beating heart animation keeps looping over dan over again Do you know why Click here to restart simulator ...

Page 29: ...7 ...

Page 30: ...8 9 ...

Page 31: ...o the location where your browser is set to save downloads Right click on the downloaded hex file which will appear at the bottom of the window and select Show in folder Click and drag the downloaded microbit xxxx hex file to the MICROBIT drive as if you were copying a file to a flash drive Notes ...

Page 32: ...10 Do you see Hello scroll across the LED matrix followed by a beating heart animation If you missed it you can slide the power switch to OFF and then turn it ON again to reset ...

Page 33: ...You can connect device to make it easier to download your code After you ve connected your device you can directly flash code to your ZOOM BIT with just ONE single click Yeah 11 Do You Know ...

Page 34: ...r the new Edge or Chrome browser and have the latest firmware on your micro bit device If you have problems connecting your device you can refer to https makecode microbit org device usb webusb troubleshoot for more info Notes ...

Page 35: ...he rounded squares to turn on off the corresponding LEDs Display number Display an arrow pointing to the direction set Turn off all LEDs Add a delay to slow down the program i e pause for the number of milliseconds ms that is set 1000 millisecond 1 second ...

Page 36: ...Here s a FUN challenge for you A B C D E M V W X Y Z ...

Page 37: ......

Page 38: ...1 2 Let s teach ZOOM BIT to sing Do Re Mi You can create a new project or continue adding blocks to your earlier code ...

Page 39: ...3 Click on Button A of your on screen simulator Do you hear a familiar tune Have fun checking out the other melodies too Make sure your computer speakers are turned ON Notes ...

Page 40: ...T to play any song you like However you will need to teach it note by note using play tone middle C for 1 beat and rest ms 1 beat blocks from Music category Do You Know Which note to play and for how long duration Pause i e do not play any note for the duration set ...

Page 41: ...Let s try to program ZOOM BIT to play the opening bars of the STAR WARS theme song These two lines are the same You can use a loop block to make your code more compact ...

Page 42: ...are colour coded You can find blocks you need in the category drawer with the same colour If you need more guidance you can go to https link cytron io zoombit tutorial 2 for step by step guide to build the code Do You Know ...

Page 43: ...You can also type keywords in the search box to find the blocks you need Do You Know ...

Page 44: ...use it has a built in speaker which enables it to produce sounds If you re using micro bit v1 without built in speaker you need to plug in a Grove buzzer to Port P0 P1 to play sounds You can refer to https link cytron io zoombit grove buzzer for more details Notes ...

Page 45: ...er or livelier your tune will be Use conditions such as melody note played or melody ended etc as event triggers in your code Set the volume ranging from 0 to 255 max loudness Play sound expressions for micro bit V2 only Stop all the sounds that are currently playing and also sounds waiting to play Enable or disable the built in speaker to play sounds for micro bit V2 only ...

Page 46: ...a music score The position of a music note on the staff i e the five horizontal lines tells us which tone to play The higher the note sits on the staff the higher the pitch frequency of the sound and vice versa Different musical notations are used to tell us the duration i e how long a note is to be played C D E F G A B ...

Page 47: ...Here s a FUN challenge for you It s a very familiar tune Can you guess what melody it is ...

Page 48: ......

Page 49: ...rogram ZOOM BIT to automatically turn ON its headlights when the surrounding is dark and turn OFF when it is bright Do You Know 1 Extensions are sets of custom blocks that we add to MakeCode Editor to enable us to easily program micro bit accessories such as our ZOOM BIT robot ...

Page 50: ...2 3 ...

Page 51: ...For more guidance you can go to https link cytron io zoombit tutorial 3 for step by step guide to build the code On start show heart icon Always check surrounding light level If light level is below 50 i e the surrounding is dark turn ON headlights Else turn OFF headlights ...

Page 52: ...lights If not try to cast a shadow over the LED matrix Next try to shine a bright flashlight at the LED matrix what do you observe Notes Light level reading ranges from 0 no light detected to 255 maximum brightness Light Level Reading ...

Page 53: ...sed i What s the light level reading in your room now What s the light level reading when you shine a bright light at the LED matrix For accuracy record at least 3 4 readings and then calculate the average value ii Do you see the headlights blinking after you press Button A Power off to make it stop This block slows down the program so that you can observe the headlights turning ON and OFF ...

Page 54: ...ressing button A and button B in the correct sequence Demo video available at https link cytron io zoombit morse code International Morse Code 1 The length of a dot is one unit 2 A dash is three units 3 The space between parts of the same letter is one unit 4 The space between letters is three units 5 The space between words is seven units ...

Page 55: ......

Page 56: ...BIT to move let s check to make sure that we ve wired it up correctly If the wheels are not spinning in the directions as shown by the red arrows you need to check and correct the DC motor connections You can refer to pp 5 6 1 2 Notes ...

Page 57: ...Now we re ready to program ZOOM BIT to move around Let s start Zip zip Zoom 1 2 You can go to https link cytron io zoombit tutorial 4 for step by step guide to build the code if you need more guidance ...

Page 58: ...3 4 ...

Page 59: ...Here s a FUN challenge for you The challenger who takes the shortest time or the least number of moves to guide ZOOM BIT out from the obstacle course is the WINNER ...

Page 60: ...You can change the speed and delay settings to control the rotation angle Try different values to complete the following table Do You Know ...

Page 61: ...e of the wheel that is spinning at a lower speed In the example above ZOOM BIT will move forward but steer to the left over time because the left wheel is spinning at a lower speed Can you predict which direction ZOOM BIT will be moving if we set Left Speed to 150 and Right Speed to 200 Test it out and see if you re right Do You Know ...

Page 62: ...tors are likely to rotate at slightly different speeds even though they are supplied with the same voltage In other words even though you program your ZOOM BIT to move straight i e same speed for both left and right wheels it is still likely that ZOOM BIT will veer slightly to the right or left after some time Do You Know ...

Page 63: ......

Page 64: ...board labelled 0 and 1 You can program them to light up in different colours using blocks from REKA BIT category drawer 1 For more guidance you can refer to https link cytron io zoombit tutorial 5 for step by step guide to build the code ...

Page 65: ...3 Do you notice RGB LED 0 on the right blinking before ZOOM BIT turns right And RGB LED 1 on the left blinking before ZOOM BIT turns left And both RGB LEDs light up in blue when ZOOM BIT is moving forward ...

Page 66: ...you can use this block to customise Set RGB pixel s to the selected colour To change colour click on the oval and select the colour you want from the colour palette Change the brightness of the RGB pixels The brightness value ranges from 0 to 255 maximum brightness Black turn off RGB LED ...

Page 67: ...Here s a FUN challenge for you For the siren you can alternate between middle C and middle F notes in a loop You can skip the siren part if you re using micro bit V1 without speaker buzzer ZOOM BIT ...

Page 68: ......

Page 69: ... ZOOM BIT to look straight ahead and likewise you can make ZOOM BIT turn its head to the left or right by controlling the servo to turn to your desired angle Let s try 1 For more guidance you can refer to https link cytron io zoombit tutorial 6 for step by step guide to build the code 2 ...

Page 70: ...3 4 Does your ZOOM BIT look straight ahead after you press Buttons A B If it is NOT properly aligned then you need to unscrew the head reposition it and then reattach it back to the servo motor horn ...

Page 71: ...e head you still find that it is turned slightly to the right left when it should be looking straight you can correct it by making adjustment to your code Follow the steps below to determine the angle correction for your ZOOM BIT 1 2 ...

Page 72: ...ight the variable angle_correction is changed by 1 and the head turns to the right by 1 degree To read the value of angle_correction lift the robot so that the micro bit logo is up and robot head is facing down On start variable angle_correction is set to 0 If tilted left the variable is changed by 1 and the head turns to the left by 1 degree ...

Page 73: ... 5 Record the angle_correction reading here Now that you know the angle_correction value for your ZOOM BIT you can use that in your future projects to ensure that the head is turned to the angle you want ...

Page 74: ... s a sample code which includes angle correction When powered up ZOOM BIT will lookto the left then to the right and finally face straight ahead Fill in the angle_correction value you recorded earlier here ...

Page 75: ...icro bit V2 you can use On Loud Sound block from Input category as the trigger for ZOOM BIT to start dancing and you can add Music blocks too to make the performance more lively Here s a FUN challenge for you ...

Page 76: ......

Page 77: ... that ZOOM BIT is mobile let s teach him not to bump into obstacles in its path 1 2 You can go to https link cytron io zoombit tutorial 7 for step by step guide to build the code if you need more guidance ...

Page 78: ...ward when no obstacle is detected Try to hold up your hand in front of ZOOM BIT Does your robot stop when it is about 10cm from your hand Slowly move your hand towards ZOOM BIT Observe its response when the distance is less than 10cm ...

Page 79: ...et s make ZOOM BIT turn right when Button A is pressed and turn left when Button B is pressed when it is in a stationary mode i e stops 10 cm away from an obstacle 4 This is called a nested if condition ...

Page 80: ...After creating a function you can use the function in multiple places in your program without having to build the same blocks of code over and over again In addition professional programmers also use functions to make their code more easily readable by others Do You Know 5 ...

Page 81: ...6 7 You can click icon to collapse the blocks of code after you re done building a function Click icon to open if you need to review or edit your code ...

Page 82: ...8 ...

Page 83: ...OOM BIT s path is blocked by an obstacle you can press Button A to turn right or Button B to turn left to guide ZOOM BIT to bypass the hindrance Do you think you can modify the code so that ZOOM BIT can autonomously move away from obstacles without waiting for your help Give it a try ...

Page 84: ...sing a song Move the palm of your hand towards or away from its face to get ZOOM BIT to play the tone that you want If you re not sure how it works scan the QR code to watch a demo video Here s a FUN challenge for you ...

Page 85: ......

Page 86: ...de the line color switch to DARK as the track provided is using a black line against a white background Maker Line Sensor Top View ZOOM BIT can be programmed to follow a line ZOOM BIT can easily do that because it is equipped with Maker Line sensor The sensor enables it to detect a line either black or white against a background with a contrasting colour Do You Know ...

Page 87: ...t Calibration only needs to be carried out once unless the sensor height line or background color has changed If the calibration is successful you ll see a running light effect your MAKER LINE is now ready to use Scan this QR code to watch a demo video if you re not sure what to do or how it works 2 3 4 ...

Page 88: ...For more guidance you can refer to https link cytron io zoombit tutorial 8 for step by step guide to build the code 1 2 ...

Page 89: ...3 Watch in awe as your ZOOM BIT zooms off and moves around track after you press Button A Can you figure out how the code works ...

Page 90: ...is pressed exit the while loop Play melody jump up once Forever check Maker Line reading and respond accordingly Condition Line detected What to do to stay get backon track Centre Move straight Left Turn left slightly Right Turn right slightly Far left Turn left Far right Turn right ...

Page 91: ...T gets confused because in our code earlier we did not tell ZOOM BIT what to do when no line is detected To prevent ZOOM BIT from wandering away we need to teach ZOOM BIT to find its way back on track by turning in the same direction as before it loses detection of the line until the line is detected again We can add a variable position to our code for that purpose Turn to the next page to learn h...

Page 92: ...4 ...

Page 93: ...5 Set the variable position to 0 when ZOOM BIT is powered up Set variable position to 1 when line is detected on left or far left set to 2 when line is detected on right or far right ...

Page 94: ...6 This is a nested if condition Check if variable position is 1 then turn left else if variable position is 2 then turn right A new condition whereby no line is detected ...

Page 95: ...7 Let s test Try to push ZOOM BIT off track until no line is detected by Maker Line Do you notice ZOOM BIT readjusting its position to get back on track instead of wandering off ...

Page 96: ... Tips We can program ZOOM BIT to know that it has crossed the finishing line by using the line detected on all block Here s a FUN challenge for you ...

Page 97: ...sing the track provided you can also get creative and design your own track using black vinyl electrical tape You can easily get one at any hardware store Have fun designing your own track for ZOOM BIT Do You Know ...

Page 98: ......

Page 99: ...ZOOM BIT many tricks and he has learned them one by one Let s now train ZOOM BIT to juggle them all switching from one mode to another effortlessly MODE 0 Manual Mode MODE 2 Line Following Mode MODE 1 Obstacle Avoidance Mode ...

Page 100: ...1 Exclude this music block if you re using micro bit V1 ...

Page 101: ...Next let s add the other modes To do that we re going to use functions 2 ...

Page 102: ...t in Chapter 7 However here the blocks are in a function obstacle_avoidance block instead of forever block 3 You can click icon to collapse the blocks of code after you re done building the function Click icon to open if you need to review or edit your code ...

Page 103: ...blocks are in a function line_following block instead of a forever block Take note that you ll need to create a new variable position 4 If you re not sure how to do that you can refer to https link cytron io zoombit tutorial 9 for step by step guide to build the code 5 ...

Page 104: ...Next we are going to add modes to our program so that when we change from one mode to another ZOOM BIT will automatically perform the corresponding task which we assign to that particular mode 6 ...

Page 105: ...7 Replace with on logo down block if you re using micro bit V1 ...

Page 106: ...8 ...

Page 107: ...Here s a FUN challenge for you Here s a tip to help you get started You ll need to add another else if condition for mode 3 and also create a new function for your new mode Give it a try ...

Page 108: ......

Page 109: ...it on your ZOOM BIT is equipped with radio communication function In other words if you have another micro bit you can program it to be used as a remote controller to control your ZOOM BIT Let s try Do You Know 1 ...

Page 110: ...We need to set both the micro bit remote controller and ZOOM BIT to the same radio group in order for them to transmit and receive radio signals from each other In this example we set both to radio group 1 ...

Page 111: ...4 Brake Scroll Hi across the LED matrix Toggle headlights Move forward Turn left Turn right Reverse Now you can remote control your ZOOM BIT to roam the territory Have fun ...

Page 112: ...FUN challenge for you Here s a tip for you You can add on button B pressed and on button A B pressed to your remote controller code micro bit and you ll need to add new else if conditions to your ZOOM BIT s code ...

Page 113: ... CHAPTER 5 Signal using RGB LEDs Lesson challenge completed on Verified by Lesson challenge completed on Verified by Lesson challenge completed on Verified by Lesson challenge completed on Verified by Lesson challenge completed on Verified by I finished building my ZOOM BIT on ____________ and together we explored the lessons in this book and attempted all the challenges ...

Page 114: ...y on track CHAPTER 9 Change from one mode to another BONUS CHAPTER Remote control Lesson challenge completed on Verified by Lesson challenge completed on Verified by Lesson challenge completed on Verified by Lesson challenge completed on Verified by Lesson challenge completed on Verified by P S Get a teacher parent to check verify for you ...

Page 115: ... had fun along the way So what s next You can visit www cytron io to explore and get add on sensors or parts to customize your robot car How about adding a Grove OLED Display to the I2C port Or perhaps adding more servo motors to form a robot arm The possibilities are endless Have fun exploring Do share your ZOOM BIT adventures with us on Telegram t me zoombit_support We d love to hear from you Ch...

Page 116: ......

Reviews: