[{"data":1,"prerenderedAt":2614},["ShallowReactive",2],{"tutorial:\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors":3,"tutorial-steps:\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors":875,"kit-\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors":1472,"key-words-glossary":2069,"glossary":2433},{"id":4,"title":5,"body":6,"description":853,"draft":856,"duration":857,"extension":858,"image":859,"kit":860,"language":864,"level":865,"meta":866,"navigation":867,"path":868,"pdf":869,"platform":870,"seo":871,"stem":872,"youtube":873,"__hash__":874},"tutorials\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002Findex.md","Code Rock Paper Scissors on a micro:bit with EduBlocks",{"type":7,"value":8,"toc":852},"minimark",[9],[10,11,12,105,111,118,179,228,253,332,386,438,506,583,650,693,713,757,787],"tutorial-steps",{},[13,14,16,40],"step",{"title":15},"Overview",[17,18,19,20,25,26,30,31,34,35,39],"p",{},"In this project you will learn how to code your ",[21,22,24],"g",{"slug":23},"micro-bit","micro:bit"," to play rock, paper, scissors using gestures and the ",[21,27,29],{"slug":28},"led-matrix","LED matrix",". We will start by understanding the basic game logic and how to present rock, paper, and scissors on the LED matrix. You will discover how to use ",[21,32,33],{"slug":33},"random"," selection for the micro:bit's choice and show it on the LED matrix, so players can see what the micro:bit picked and work out whether they have won. Through this project you will develop fundamental coding concepts like ",[21,36,38],{"slug":37},"variable","variables",", conditionals and random numbers while creating something fun and interactive. By the end you will have a fully functional game that you can play with friends or challenge the micro:bit yourself.",[41,42,45,51],"callout",{"color":43,"icon":44},"green","🎯",[17,46,47],{},[48,49,50],"strong",{},"What you'll learn",[52,53,54,62,69,74,80,85,93,99],"ul",{},[55,56,57,58],"li",{},"How to ",[21,59,61],{"slug":60},"importing-libraries","import Python libraries",[55,63,64,65],{},"How to use a ",[21,66,68],{"slug":67},"while-loop","while loop",[55,70,71,72],{},"How to create and use a ",[21,73,37],{"slug":37},[55,75,76,77],{},"How to use the ",[21,78,79],{"slug":79},"accelerometer",[55,81,82,83],{},"How to display your own images on the ",[21,84,29],{"slug":28},[55,86,87,88,92],{},"How to use ",[21,89,91],{"slug":90},"if-statement","if",", elif and else statements",[55,94,87,95],{},[21,96,98],{"slug":97},"comparison-operators","comparison operators",[55,100,57,101,104],{},[21,102,103],{"slug":33},"randomise"," choices",[13,106,108],{"title":107},"What you'll need",[109,110],"what-youll-need",{},[13,112,114],{"title":113},"Key words",[115,116],"key-words",{"terms":117},"importing-libraries,variable,while-loop,if-statement,accelerometer,led-matrix,comparison-operators,random",[13,119,121,156,163,173],{"title":120},"Set up your micro:bit EduBlocks Editor",[122,123,124,127,138],"ol",{},[55,125,126],{},"Open your web browser. We recommend Google Chrome or Microsoft Edge.",[55,128,129,130,137],{},"In the address bar type ",[131,132,136],"a",{"href":133,"rel":134},"https:\u002F\u002Fapp.edublocks.org\u002F",[135],"nofollow","app.edublocks.org",".",[55,139,140,141,144,145,147,148,151,152,155],{},"Under ",[48,142,143],{},"Create New Project",", select ",[48,146,24],{},". Name your project ",[48,149,150],{},"Rock Paper Scissors",", and make sure ",[48,153,154],{},"block"," is selected under type.",[17,157,158],{},[159,160],"img",{"alt":161,"src":162},"Creating a new EduBlocks project","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FProjectCreation.webp",[122,164,166],{"start":165},4,[55,167,168,169,172],{},"Select ",[48,170,171],{},"Create"," to open the micro:bit editor.",[17,174,175],{},[159,176],{"alt":177,"src":178},"The EduBlocks code area","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FCodeArea.webp",[13,180,182,215,222],{"title":181},"Importing MicroPython libraries",[122,183,184,202],{},[55,185,168,186,144,189,192,193,197,198,201],{},[48,187,188],{},"Basic",[48,190,191],{},"Imports",". Select ",[194,195,196],"code",{},"from microbit import *"," and snap it to the ",[194,199,200],{},"# Start code here"," block.",[55,203,168,204,144,206,208,209,212,213,201],{},[48,205,188],{},[48,207,191],{},", select an ",[194,210,211],{},"import random"," block and snap it to the ",[194,214,196],{},[17,216,217,218,221],{},"This ",[21,219,220],{"slug":60},"imports the Python libraries"," that we need to create our game.",[17,223,224],{},[159,225],{"alt":226,"src":227},"Importing the MicroPython libraries","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS1_ImportingPythonLibraries.webp",[13,229,231,244,247],{"title":230},"Create a While Loop",[17,232,168,233,144,235,238,239,212,242,201],{},[48,234,188],{},[48,236,237],{},"Loops",". Select a ",[194,240,241],{},"while True:",[194,243,211],{},[17,245,246],{},"This creates a loop that goes around and around forever.",[17,248,249],{},[159,250],{"alt":251,"src":252},"Creating a while loop","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS2_CreateWhileLoop.webp",[13,254,256,317,323,326],{"title":255},"Create the Paper Variable",[122,257,258,270,280,297],{},[55,259,168,260,192,263,266,267,137],{},[48,261,262],{},"Variables",[48,264,265],{},"Create Variable"," and name it ",[48,268,269],{},"paper",[55,271,272,273,276,277,201],{},"Select a ",[194,274,275],{},"paper = 0"," block and snap it within the ",[194,278,279],{},"while True",[55,281,168,282,285,286,289,290,293,294,137],{},[48,283,284],{},"Display",". Select an ",[194,287,288],{},"Image"," block and snap it onto the ",[194,291,292],{},"paper ="," block where it says ",[48,295,296],{},"0",[55,298,299,300,302,303,306,307,310,311,313,314,137],{},"Create the following pattern within the ",[194,301,288],{}," block. A ",[48,304,305],{},"9"," means the LED is turned ",[48,308,309],{},"on"," and a ",[48,312,296],{}," means the LED is ",[48,315,316],{},"off",[17,318,319],{},[159,320],{"alt":321,"src":322},"Creating a representation of paper in lights","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS3_PaperRepresentation.webp",[17,324,325],{},"Here is the code so far:",[17,327,328],{},[159,329],{"alt":330,"src":331},"Image of completed code so far","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS3_CreatePaperVariable.webp",[13,333,335,371,377,380],{"title":334},"Create the Rock Variable",[122,336,337,347,356,367],{},[55,338,168,339,192,341,266,344,137],{},[48,340,262],{},[48,342,343],{},"Create variable",[48,345,346],{},"rock",[55,348,272,349,352,353,201],{},[194,350,351],{},"rock = 0"," block and snap it below the ",[194,354,355],{},"paper = Image (\"99999:\", \"90009:\", \"90009:\", \"90009:\", \"99999\")",[55,357,168,358,285,360,289,362,293,365,137],{},[48,359,284],{},[194,361,288],{},[194,363,364],{},"rock =",[48,366,296],{},[55,368,299,369,201],{},[194,370,288],{},[17,372,373],{},[159,374],{"alt":375,"src":376},"Representation of rock in code","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS4_RockRepresentation.webp",[17,378,379],{},"Completed code so far:",[17,381,382],{},[159,383],{"alt":384,"src":385},"Completed code so far.","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS4_CreateRockVariable.webp",[13,387,389,423,429,432],{"title":388},"Create the Scissors Variable",[122,390,391,400,408,419],{},[55,392,168,393,192,395,266,397,137],{},[48,394,262],{},[48,396,265],{},[48,398,399],{},"scissors",[55,401,272,402,352,405,201],{},[194,403,404],{},"scissors = 0",[194,406,407],{},"rock = Image (\"00000:\", \"09990:\", \"09990:\", \"09990:\", \"00000\")",[55,409,168,410,285,412,289,414,293,417,137],{},[48,411,284],{},[194,413,288],{},[194,415,416],{},"scissors =",[48,418,296],{},[55,420,299,421,201],{},[194,422,288],{},[17,424,425],{},[159,426],{"alt":427,"src":428},"Representation of Scissors in code","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS5_ScissorsRepresentation.webp",[17,430,431],{},"Completed code so far with the scissors variable added.",[17,433,434],{},[159,435],{"alt":436,"src":437},"Completed code so far","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS5_CreateScissorsVariable.webp",[13,439,441,497,500],{"title":440},"Check for a Shake",[122,442,443,456,469,485],{},[55,444,168,445,144,447,208,450,212,453,201],{},[48,446,188],{},[48,448,449],{},"Logic",[194,451,452],{},"if True:",[194,454,455],{},"scissors = Image (\"90099:\", \"09099:\", \"00900:\", \"09099:\", \"90099\")",[55,457,168,458,285,461,289,464,293,466,137],{},[48,459,460],{},"Accelerometer",[194,462,463],{},"accelerometer.was_gesture (\"shake\")",[194,465,91],{},[48,467,468],{},"True",[55,470,168,471,144,473,266,475,238,478,481,482,201],{},[48,472,262],{},[48,474,265],{},[48,476,477],{},"choice",[194,479,480],{},"choice = 0"," block and snap it inside the ",[194,483,484],{},"if accelerometer.was_gesture (\"shake\"):",[55,486,487,488,490,491,493,494],{},"Within the ",[48,489,296],{}," of the ",[194,492,477],{}," block type ",[48,495,496],{},"random.randint(0, 2)",[17,498,499],{},"This will check to see if the micro:bit has been shaken and if it had it will set choice to a random number between 0 and 2.",[17,501,502],{},[159,503],{"alt":504,"src":505},"Checking to see if the micro:bit has been shaken","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS6_CheckForShake.webp",[13,507,509,574,577],{"title":508},"Create the If Condition",[122,510,511,522,537,552,562],{},[55,512,168,513,144,515,208,517,212,519,201],{},[48,514,188],{},[48,516,449],{},[194,518,452],{},[194,520,521],{},"choice = random.randint(0, 2)",[55,523,168,524,144,526,528,529,532,533,293,535,137],{},[48,525,188],{},[48,527,449],{},", select a ",[194,530,531],{},"0 == 0"," block and snap it on to the ",[194,534,91],{},[48,536,468],{},[55,538,168,539,542,543,289,545,547,548,551],{},[48,540,541],{},"Variables."," Select a ",[194,544,477],{},[194,546,91],{}," block before the ",[48,549,550],{},"=="," sign.",[55,553,168,554,238,556,481,559,201],{},[48,555,284],{},[194,557,558],{},"display.show(10)",[194,560,561],{},"if choice == 0:",[55,563,168,564,238,566,289,568,293,571,137],{},[48,565,262],{},[194,567,269],{},[194,569,570],{},"display.show",[48,572,573],{},"10",[17,575,576],{},"This will check to see if choice is equal to 0 and if it is paper will be displayed on the LED matrix.",[17,578,579],{},[159,580],{"alt":581,"src":582},"Creating the if condition","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS7_CreateIfCondition.webp",[13,584,586,641,644],{"title":585},"Create the elif Condition",[122,587,588,601,621,631],{},[55,589,168,590,144,592,595,596,212,599,201],{},[48,591,188],{},[48,593,594],{},"Logic."," Select an ",[194,597,598],{},"elif True:",[194,600,561],{},[55,602,168,603,144,605,542,607,289,609,293,612,614,615,617,618,137],{},[48,604,188],{},[48,606,594],{},[194,608,531],{},[194,610,611],{},"elif",[48,613,468],{},". Change the ",[48,616,296],{}," to ",[48,619,620],{},"1",[55,622,168,623,238,625,627,628,201],{},[48,624,284],{},[194,626,558],{}," block and snap it into the ",[194,629,630],{},"elif choice == 1:",[55,632,168,633,238,635,289,637,293,639,137],{},[48,634,262],{},[194,636,346],{},[194,638,570],{},[48,640,573],{},[17,642,643],{},"This will check to see if choice is equal to 1 and if it is rock will be displayed on the LED matrix.",[17,645,646],{},[159,647],{"alt":648,"src":649},"Creating the elif condition","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS8_CreateElifCondition.webp",[13,651,653,684,687],{"title":652},"Create the Else Condition",[122,654,655,666,674],{},[55,656,168,657,144,659,595,661,212,664,201],{},[48,658,188],{},[48,660,594],{},[194,662,663],{},"else:",[194,665,630],{},[55,667,168,668,238,670,481,672,201],{},[48,669,284],{},[194,671,558],{},[194,673,663],{},[55,675,168,676,238,678,289,680,293,682,137],{},[48,677,262],{},[194,679,399],{},[194,681,570],{},[48,683,573],{},[17,685,686],{},"This will display scissors on the LED matrix if choice does not equal 0 or 1.",[17,688,689],{},[159,690],{"alt":691,"src":692},"Creating the else condition","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FS9_CreateElseCondition.webp",[13,694,696],{"title":695},"Downloading the Code",[122,697,698,701,707],{},[55,699,700],{},"Connect the micro:bit to the computer with the micro USB cable.",[55,702,168,703,706],{},[48,704,705],{},"Connect"," and follow the on-screen prompts to pair the micro:bit with your web browser.",[55,708,168,709,712],{},[48,710,711],{},"Download"," to send the code to your micro:bit.",[13,714,716,721,724,744,750,754],{"title":715},"Run it and Watch",[717,718,720],"h3",{"id":719},"in-the-web-browser","In the web browser",[17,722,723],{},"EduBlocks has a built-in micro:bit simulator, handy if you haven't got a micro:bit to hand.",[122,725,726,732,738],{},[55,727,728,729,137],{},"On the right-hand side of the screen, select ",[48,730,731],{},"Simulator",[55,733,734,735,137],{},"From the accelerometer menu below the simulator, select ",[48,736,737],{},"Shake",[55,739,168,740,743],{},[48,741,742],{},"Send",". This simulates a shake of the micro:bit and you will see a rock, paper, or scissors icon display on the LED matrix.",[17,745,746],{},[159,747],{"alt":748,"src":749},"The EduBlocks simulator","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Fmicrofit\u002FSimulatorPreview.webp",[717,751,753],{"id":752},"on-a-real-microbit","On a real micro:bit",[17,755,756],{},"Once the code has downloaded, give the micro:bit a shake and see an icon display on the LED matrix. Why not find a friend and see who can beat the micro:bit?",[13,758,760],{"title":759},"Try it yourself",[761,762,763,781],"try-it",{},[17,764,765,768,769,772,773,776,777,780],{},[48,766,767],{},"Challenge:"," Can you add a sound so your micro:bit gives a little beep each time it makes a choice? Try snapping an ",[194,770,771],{},"audio.play(Sound.HAPPY)"," block from ",[48,774,775],{},"Audio"," inside your ",[194,778,779],{},"if accelerometer.was_gesture(\"shake\"):"," check, just after you set the choice. For an extra challenge, pick a different sound for rock, paper and scissors!",[17,782,783],{},[784,785,786],"em",{},"Good to know: the sound plays through the built-in speaker, which only the micro:bit V2 has. If you have a V1, you can still try this challenge by clipping a buzzer or headphones to the pins. Everything else in this project works happily on both V1 and V2.",[13,788,790],{"title":789},"Stuck? Quick fixes",[791,792,793,806],"table",{},[794,795,796],"thead",{},[797,798,799,803],"tr",{},[800,801,802],"th",{},"Problem",[800,804,805],{},"Try this",[807,808,809,820,828,836,844],"tbody",{},[797,810,811,815],{},[812,813,814],"td",{},"Nothing happens when I shake it",[812,816,817,818,201],{},"Give it a firm shake, not too gentle. Also check your blocks are snapped inside the ",[194,819,779],{},[797,821,822,825],{},[812,823,824],{},"The same icon keeps showing",[812,826,827],{},"That's normal! The choice is random, so shake a few more times and the others will appear.",[797,829,830,833],{},[812,831,832],{},"My icons look wrong or blank",[812,834,835],{},"Open each Image block and check you've selected the right squares for rock, paper and scissors.",[797,837,838,841],{},[812,839,840],{},"It only ever shows two icons",[812,842,843],{},"Check your elif is set to choice == 1, and that random.randint goes from 0 to 2.",[797,845,846,849],{},[812,847,848],{},"It won't download to my micro:bit",[812,850,851],{},"Make sure the micro:bit is plugged in with the USB cable, then try Connect again.",{"title":853,"searchDepth":854,"depth":854,"links":855},"",2,[],false,"10 mins","md","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002FRockPaperScissors_Cover.png",[861,24,862,863],"The micro:bit EduBlocks editor","micro USB cable","battery pack for the micro:bit (optional)","edublocks","Beginner",{},true,"\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors","\u002Flearn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002Frock-paper-scissors.pdf","microbit",{"title":5,"description":853},"learn\u002Fmicrobit\u002Fedublocks\u002Frock-paper-scissors\u002Findex",null,"S4hDx5VmbOeiIPZccBG1e4MHw2-JJfsyER2aShLxBWo",{"id":4,"title":5,"body":876,"description":853,"draft":856,"duration":857,"extension":858,"image":859,"kit":1469,"language":864,"level":865,"meta":1470,"navigation":867,"path":868,"pdf":869,"platform":870,"seo":1471,"stem":872,"youtube":873,"__hash__":874},{"type":7,"value":877,"toc":1467},[878],[10,879,880,932,936,940,975,1007,1025,1075,1117,1159,1209,1269,1323,1361,1375,1403,1421],{},[13,881,882,892],{"title":15},[17,883,19,884,25,886,30,888,34,890,39],{},[21,885,24],{"slug":23},[21,887,29],{"slug":28},[21,889,33],{"slug":33},[21,891,38],{"slug":37},[41,893,894,898],{"color":43,"icon":44},[17,895,896],{},[48,897,50],{},[52,899,900,904,908,912,916,920,924,928],{},[55,901,57,902],{},[21,903,61],{"slug":60},[55,905,64,906],{},[21,907,68],{"slug":67},[55,909,71,910],{},[21,911,37],{"slug":37},[55,913,76,914],{},[21,915,79],{"slug":79},[55,917,82,918],{},[21,919,29],{"slug":28},[55,921,87,922,92],{},[21,923,91],{"slug":90},[55,925,87,926],{},[21,927,98],{"slug":97},[55,929,57,930,104],{},[21,931,103],{"slug":33},[13,933,934],{"title":107},[109,935],{},[13,937,938],{"title":113},[115,939],{"terms":117},[13,941,942,961,965,971],{"title":120},[122,943,944,946,951],{},[55,945,126],{},[55,947,129,948,137],{},[131,949,136],{"href":133,"rel":950},[135],[55,952,140,953,144,955,147,957,151,959,155],{},[48,954,143],{},[48,956,24],{},[48,958,150],{},[48,960,154],{},[17,962,963],{},[159,964],{"alt":161,"src":162},[122,966,967],{"start":165},[55,968,168,969,172],{},[48,970,171],{},[17,972,973],{},[159,974],{"alt":177,"src":178},[13,976,977,999,1003],{"title":181},[122,978,979,989],{},[55,980,168,981,144,983,192,985,197,987,201],{},[48,982,188],{},[48,984,191],{},[194,986,196],{},[194,988,200],{},[55,990,168,991,144,993,208,995,212,997,201],{},[48,992,188],{},[48,994,191],{},[194,996,211],{},[194,998,196],{},[17,1000,217,1001,221],{},[21,1002,220],{"slug":60},[17,1004,1005],{},[159,1006],{"alt":226,"src":227},[13,1008,1009,1019,1021],{"title":230},[17,1010,168,1011,144,1013,238,1015,212,1017,201],{},[48,1012,188],{},[48,1014,237],{},[194,1016,241],{},[194,1018,211],{},[17,1020,246],{},[17,1022,1023],{},[159,1024],{"alt":251,"src":252},[13,1026,1027,1065,1069,1071],{"title":255},[122,1028,1029,1037,1043,1053],{},[55,1030,168,1031,192,1033,266,1035,137],{},[48,1032,262],{},[48,1034,265],{},[48,1036,269],{},[55,1038,272,1039,276,1041,201],{},[194,1040,275],{},[194,1042,279],{},[55,1044,168,1045,285,1047,289,1049,293,1051,137],{},[48,1046,284],{},[194,1048,288],{},[194,1050,292],{},[48,1052,296],{},[55,1054,299,1055,302,1057,306,1059,310,1061,313,1063,137],{},[194,1056,288],{},[48,1058,305],{},[48,1060,309],{},[48,1062,296],{},[48,1064,316],{},[17,1066,1067],{},[159,1068],{"alt":321,"src":322},[17,1070,325],{},[17,1072,1073],{},[159,1074],{"alt":330,"src":331},[13,1076,1077,1107,1111,1113],{"title":334},[122,1078,1079,1087,1093,1103],{},[55,1080,168,1081,192,1083,266,1085,137],{},[48,1082,262],{},[48,1084,343],{},[48,1086,346],{},[55,1088,272,1089,352,1091,201],{},[194,1090,351],{},[194,1092,355],{},[55,1094,168,1095,285,1097,289,1099,293,1101,137],{},[48,1096,284],{},[194,1098,288],{},[194,1100,364],{},[48,1102,296],{},[55,1104,299,1105,201],{},[194,1106,288],{},[17,1108,1109],{},[159,1110],{"alt":375,"src":376},[17,1112,379],{},[17,1114,1115],{},[159,1116],{"alt":384,"src":385},[13,1118,1119,1149,1153,1155],{"title":388},[122,1120,1121,1129,1135,1145],{},[55,1122,168,1123,192,1125,266,1127,137],{},[48,1124,262],{},[48,1126,265],{},[48,1128,399],{},[55,1130,272,1131,352,1133,201],{},[194,1132,404],{},[194,1134,407],{},[55,1136,168,1137,285,1139,289,1141,293,1143,137],{},[48,1138,284],{},[194,1140,288],{},[194,1142,416],{},[48,1144,296],{},[55,1146,299,1147,201],{},[194,1148,288],{},[17,1150,1151],{},[159,1152],{"alt":427,"src":428},[17,1154,431],{},[17,1156,1157],{},[159,1158],{"alt":436,"src":437},[13,1160,1161,1203,1205],{"title":440},[122,1162,1163,1173,1183,1195],{},[55,1164,168,1165,144,1167,208,1169,212,1171,201],{},[48,1166,188],{},[48,1168,449],{},[194,1170,452],{},[194,1172,455],{},[55,1174,168,1175,285,1177,289,1179,293,1181,137],{},[48,1176,460],{},[194,1178,463],{},[194,1180,91],{},[48,1182,468],{},[55,1184,168,1185,144,1187,266,1189,238,1191,481,1193,201],{},[48,1186,262],{},[48,1188,265],{},[48,1190,477],{},[194,1192,480],{},[194,1194,484],{},[55,1196,487,1197,490,1199,493,1201],{},[48,1198,296],{},[194,1200,477],{},[48,1202,496],{},[17,1204,499],{},[17,1206,1207],{},[159,1208],{"alt":504,"src":505},[13,1210,1211,1263,1265],{"title":508},[122,1212,1213,1223,1235,1245,1253],{},[55,1214,168,1215,144,1217,208,1219,212,1221,201],{},[48,1216,188],{},[48,1218,449],{},[194,1220,452],{},[194,1222,521],{},[55,1224,168,1225,144,1227,528,1229,532,1231,293,1233,137],{},[48,1226,188],{},[48,1228,449],{},[194,1230,531],{},[194,1232,91],{},[48,1234,468],{},[55,1236,168,1237,542,1239,289,1241,547,1243,551],{},[48,1238,541],{},[194,1240,477],{},[194,1242,91],{},[48,1244,550],{},[55,1246,168,1247,238,1249,481,1251,201],{},[48,1248,284],{},[194,1250,558],{},[194,1252,561],{},[55,1254,168,1255,238,1257,289,1259,293,1261,137],{},[48,1256,262],{},[194,1258,269],{},[194,1260,570],{},[48,1262,573],{},[17,1264,576],{},[17,1266,1267],{},[159,1268],{"alt":581,"src":582},[13,1270,1271,1317,1319],{"title":585},[122,1272,1273,1283,1299,1307],{},[55,1274,168,1275,144,1277,595,1279,212,1281,201],{},[48,1276,188],{},[48,1278,594],{},[194,1280,598],{},[194,1282,561],{},[55,1284,168,1285,144,1287,542,1289,289,1291,293,1293,614,1295,617,1297,137],{},[48,1286,188],{},[48,1288,594],{},[194,1290,531],{},[194,1292,611],{},[48,1294,468],{},[48,1296,296],{},[48,1298,620],{},[55,1300,168,1301,238,1303,627,1305,201],{},[48,1302,284],{},[194,1304,558],{},[194,1306,630],{},[55,1308,168,1309,238,1311,289,1313,293,1315,137],{},[48,1310,262],{},[194,1312,346],{},[194,1314,570],{},[48,1316,573],{},[17,1318,643],{},[17,1320,1321],{},[159,1322],{"alt":648,"src":649},[13,1324,1325,1355,1357],{"title":652},[122,1326,1327,1337,1345],{},[55,1328,168,1329,144,1331,595,1333,212,1335,201],{},[48,1330,188],{},[48,1332,594],{},[194,1334,663],{},[194,1336,630],{},[55,1338,168,1339,238,1341,481,1343,201],{},[48,1340,284],{},[194,1342,558],{},[194,1344,663],{},[55,1346,168,1347,238,1349,289,1351,293,1353,137],{},[48,1348,262],{},[194,1350,399],{},[194,1352,570],{},[48,1354,573],{},[17,1356,686],{},[17,1358,1359],{},[159,1360],{"alt":691,"src":692},[13,1362,1363],{"title":695},[122,1364,1365,1367,1371],{},[55,1366,700],{},[55,1368,168,1369,706],{},[48,1370,705],{},[55,1372,168,1373,712],{},[48,1374,711],{},[13,1376,1377,1379,1381,1395,1399,1401],{"title":715},[717,1378,720],{"id":719},[17,1380,723],{},[122,1382,1383,1387,1391],{},[55,1384,728,1385,137],{},[48,1386,731],{},[55,1388,734,1389,137],{},[48,1390,737],{},[55,1392,168,1393,743],{},[48,1394,742],{},[17,1396,1397],{},[159,1398],{"alt":748,"src":749},[717,1400,753],{"id":752},[17,1402,756],{},[13,1404,1405],{"title":759},[761,1406,1407,1417],{},[17,1408,1409,768,1411,772,1413,776,1415,780],{},[48,1410,767],{},[194,1412,771],{},[48,1414,775],{},[194,1416,779],{},[17,1418,1419],{},[784,1420,786],{},[13,1422,1423],{"title":789},[791,1424,1425,1433],{},[794,1426,1427],{},[797,1428,1429,1431],{},[800,1430,802],{},[800,1432,805],{},[807,1434,1435,1443,1449,1455,1461],{},[797,1436,1437,1439],{},[812,1438,814],{},[812,1440,817,1441,201],{},[194,1442,779],{},[797,1444,1445,1447],{},[812,1446,824],{},[812,1448,827],{},[797,1450,1451,1453],{},[812,1452,832],{},[812,1454,835],{},[797,1456,1457,1459],{},[812,1458,840],{},[812,1460,843],{},[797,1462,1463,1465],{},[812,1464,848],{},[812,1466,851],{},{"title":853,"searchDepth":854,"depth":854,"links":1468},[],[861,24,862,863],{},{"title":5,"description":853},{"id":4,"title":5,"body":1473,"description":853,"draft":856,"duration":857,"extension":858,"image":859,"kit":2066,"language":864,"level":865,"meta":2067,"navigation":867,"path":868,"pdf":869,"platform":870,"seo":2068,"stem":872,"youtube":873,"__hash__":874},{"type":7,"value":1474,"toc":2064},[1475],[10,1476,1477,1529,1533,1537,1572,1604,1622,1672,1714,1756,1806,1866,1920,1958,1972,2000,2018],{},[13,1478,1479,1489],{"title":15},[17,1480,19,1481,25,1483,30,1485,34,1487,39],{},[21,1482,24],{"slug":23},[21,1484,29],{"slug":28},[21,1486,33],{"slug":33},[21,1488,38],{"slug":37},[41,1490,1491,1495],{"color":43,"icon":44},[17,1492,1493],{},[48,1494,50],{},[52,1496,1497,1501,1505,1509,1513,1517,1521,1525],{},[55,1498,57,1499],{},[21,1500,61],{"slug":60},[55,1502,64,1503],{},[21,1504,68],{"slug":67},[55,1506,71,1507],{},[21,1508,37],{"slug":37},[55,1510,76,1511],{},[21,1512,79],{"slug":79},[55,1514,82,1515],{},[21,1516,29],{"slug":28},[55,1518,87,1519,92],{},[21,1520,91],{"slug":90},[55,1522,87,1523],{},[21,1524,98],{"slug":97},[55,1526,57,1527,104],{},[21,1528,103],{"slug":33},[13,1530,1531],{"title":107},[109,1532],{},[13,1534,1535],{"title":113},[115,1536],{"terms":117},[13,1538,1539,1558,1562,1568],{"title":120},[122,1540,1541,1543,1548],{},[55,1542,126],{},[55,1544,129,1545,137],{},[131,1546,136],{"href":133,"rel":1547},[135],[55,1549,140,1550,144,1552,147,1554,151,1556,155],{},[48,1551,143],{},[48,1553,24],{},[48,1555,150],{},[48,1557,154],{},[17,1559,1560],{},[159,1561],{"alt":161,"src":162},[122,1563,1564],{"start":165},[55,1565,168,1566,172],{},[48,1567,171],{},[17,1569,1570],{},[159,1571],{"alt":177,"src":178},[13,1573,1574,1596,1600],{"title":181},[122,1575,1576,1586],{},[55,1577,168,1578,144,1580,192,1582,197,1584,201],{},[48,1579,188],{},[48,1581,191],{},[194,1583,196],{},[194,1585,200],{},[55,1587,168,1588,144,1590,208,1592,212,1594,201],{},[48,1589,188],{},[48,1591,191],{},[194,1593,211],{},[194,1595,196],{},[17,1597,217,1598,221],{},[21,1599,220],{"slug":60},[17,1601,1602],{},[159,1603],{"alt":226,"src":227},[13,1605,1606,1616,1618],{"title":230},[17,1607,168,1608,144,1610,238,1612,212,1614,201],{},[48,1609,188],{},[48,1611,237],{},[194,1613,241],{},[194,1615,211],{},[17,1617,246],{},[17,1619,1620],{},[159,1621],{"alt":251,"src":252},[13,1623,1624,1662,1666,1668],{"title":255},[122,1625,1626,1634,1640,1650],{},[55,1627,168,1628,192,1630,266,1632,137],{},[48,1629,262],{},[48,1631,265],{},[48,1633,269],{},[55,1635,272,1636,276,1638,201],{},[194,1637,275],{},[194,1639,279],{},[55,1641,168,1642,285,1644,289,1646,293,1648,137],{},[48,1643,284],{},[194,1645,288],{},[194,1647,292],{},[48,1649,296],{},[55,1651,299,1652,302,1654,306,1656,310,1658,313,1660,137],{},[194,1653,288],{},[48,1655,305],{},[48,1657,309],{},[48,1659,296],{},[48,1661,316],{},[17,1663,1664],{},[159,1665],{"alt":321,"src":322},[17,1667,325],{},[17,1669,1670],{},[159,1671],{"alt":330,"src":331},[13,1673,1674,1704,1708,1710],{"title":334},[122,1675,1676,1684,1690,1700],{},[55,1677,168,1678,192,1680,266,1682,137],{},[48,1679,262],{},[48,1681,343],{},[48,1683,346],{},[55,1685,272,1686,352,1688,201],{},[194,1687,351],{},[194,1689,355],{},[55,1691,168,1692,285,1694,289,1696,293,1698,137],{},[48,1693,284],{},[194,1695,288],{},[194,1697,364],{},[48,1699,296],{},[55,1701,299,1702,201],{},[194,1703,288],{},[17,1705,1706],{},[159,1707],{"alt":375,"src":376},[17,1709,379],{},[17,1711,1712],{},[159,1713],{"alt":384,"src":385},[13,1715,1716,1746,1750,1752],{"title":388},[122,1717,1718,1726,1732,1742],{},[55,1719,168,1720,192,1722,266,1724,137],{},[48,1721,262],{},[48,1723,265],{},[48,1725,399],{},[55,1727,272,1728,352,1730,201],{},[194,1729,404],{},[194,1731,407],{},[55,1733,168,1734,285,1736,289,1738,293,1740,137],{},[48,1735,284],{},[194,1737,288],{},[194,1739,416],{},[48,1741,296],{},[55,1743,299,1744,201],{},[194,1745,288],{},[17,1747,1748],{},[159,1749],{"alt":427,"src":428},[17,1751,431],{},[17,1753,1754],{},[159,1755],{"alt":436,"src":437},[13,1757,1758,1800,1802],{"title":440},[122,1759,1760,1770,1780,1792],{},[55,1761,168,1762,144,1764,208,1766,212,1768,201],{},[48,1763,188],{},[48,1765,449],{},[194,1767,452],{},[194,1769,455],{},[55,1771,168,1772,285,1774,289,1776,293,1778,137],{},[48,1773,460],{},[194,1775,463],{},[194,1777,91],{},[48,1779,468],{},[55,1781,168,1782,144,1784,266,1786,238,1788,481,1790,201],{},[48,1783,262],{},[48,1785,265],{},[48,1787,477],{},[194,1789,480],{},[194,1791,484],{},[55,1793,487,1794,490,1796,493,1798],{},[48,1795,296],{},[194,1797,477],{},[48,1799,496],{},[17,1801,499],{},[17,1803,1804],{},[159,1805],{"alt":504,"src":505},[13,1807,1808,1860,1862],{"title":508},[122,1809,1810,1820,1832,1842,1850],{},[55,1811,168,1812,144,1814,208,1816,212,1818,201],{},[48,1813,188],{},[48,1815,449],{},[194,1817,452],{},[194,1819,521],{},[55,1821,168,1822,144,1824,528,1826,532,1828,293,1830,137],{},[48,1823,188],{},[48,1825,449],{},[194,1827,531],{},[194,1829,91],{},[48,1831,468],{},[55,1833,168,1834,542,1836,289,1838,547,1840,551],{},[48,1835,541],{},[194,1837,477],{},[194,1839,91],{},[48,1841,550],{},[55,1843,168,1844,238,1846,481,1848,201],{},[48,1845,284],{},[194,1847,558],{},[194,1849,561],{},[55,1851,168,1852,238,1854,289,1856,293,1858,137],{},[48,1853,262],{},[194,1855,269],{},[194,1857,570],{},[48,1859,573],{},[17,1861,576],{},[17,1863,1864],{},[159,1865],{"alt":581,"src":582},[13,1867,1868,1914,1916],{"title":585},[122,1869,1870,1880,1896,1904],{},[55,1871,168,1872,144,1874,595,1876,212,1878,201],{},[48,1873,188],{},[48,1875,594],{},[194,1877,598],{},[194,1879,561],{},[55,1881,168,1882,144,1884,542,1886,289,1888,293,1890,614,1892,617,1894,137],{},[48,1883,188],{},[48,1885,594],{},[194,1887,531],{},[194,1889,611],{},[48,1891,468],{},[48,1893,296],{},[48,1895,620],{},[55,1897,168,1898,238,1900,627,1902,201],{},[48,1899,284],{},[194,1901,558],{},[194,1903,630],{},[55,1905,168,1906,238,1908,289,1910,293,1912,137],{},[48,1907,262],{},[194,1909,346],{},[194,1911,570],{},[48,1913,573],{},[17,1915,643],{},[17,1917,1918],{},[159,1919],{"alt":648,"src":649},[13,1921,1922,1952,1954],{"title":652},[122,1923,1924,1934,1942],{},[55,1925,168,1926,144,1928,595,1930,212,1932,201],{},[48,1927,188],{},[48,1929,594],{},[194,1931,663],{},[194,1933,630],{},[55,1935,168,1936,238,1938,481,1940,201],{},[48,1937,284],{},[194,1939,558],{},[194,1941,663],{},[55,1943,168,1944,238,1946,289,1948,293,1950,137],{},[48,1945,262],{},[194,1947,399],{},[194,1949,570],{},[48,1951,573],{},[17,1953,686],{},[17,1955,1956],{},[159,1957],{"alt":691,"src":692},[13,1959,1960],{"title":695},[122,1961,1962,1964,1968],{},[55,1963,700],{},[55,1965,168,1966,706],{},[48,1967,705],{},[55,1969,168,1970,712],{},[48,1971,711],{},[13,1973,1974,1976,1978,1992,1996,1998],{"title":715},[717,1975,720],{"id":719},[17,1977,723],{},[122,1979,1980,1984,1988],{},[55,1981,728,1982,137],{},[48,1983,731],{},[55,1985,734,1986,137],{},[48,1987,737],{},[55,1989,168,1990,743],{},[48,1991,742],{},[17,1993,1994],{},[159,1995],{"alt":748,"src":749},[717,1997,753],{"id":752},[17,1999,756],{},[13,2001,2002],{"title":759},[761,2003,2004,2014],{},[17,2005,2006,768,2008,772,2010,776,2012,780],{},[48,2007,767],{},[194,2009,771],{},[48,2011,775],{},[194,2013,779],{},[17,2015,2016],{},[784,2017,786],{},[13,2019,2020],{"title":789},[791,2021,2022,2030],{},[794,2023,2024],{},[797,2025,2026,2028],{},[800,2027,802],{},[800,2029,805],{},[807,2031,2032,2040,2046,2052,2058],{},[797,2033,2034,2036],{},[812,2035,814],{},[812,2037,817,2038,201],{},[194,2039,779],{},[797,2041,2042,2044],{},[812,2043,824],{},[812,2045,827],{},[797,2047,2048,2050],{},[812,2049,832],{},[812,2051,835],{},[797,2053,2054,2056],{},[812,2055,840],{},[812,2057,843],{},[797,2059,2060,2062],{},[812,2061,848],{},[812,2063,851],{},{"title":853,"searchDepth":854,"depth":854,"links":2065},[],[861,24,862,863],{},{"title":5,"description":853},[2070,2082,2094,2106,2118,2131,2144,2156,2169,2181,2193,2206,2218,2230,2242,2253,2265,2277,2289,2301,2313,2325,2337,2349,2361,2373,2385,2397,2409,2421],{"id":2071,"category":2072,"definition":2073,"example":2074,"extension":858,"meta":2075,"stem":2080,"term":460,"__hash__":2081},"glossary\u002Fglossary\u002Faccelerometer.md","Hardware","An accelerometer is a tiny part inside the micro:bit that senses movement, like tilting, shaking or being turned over. It turns that movement into numbers your code can react to.","A bit like the sensor in a games controller that knows when you tilt it to steer, the accelerometer notices when the micro:bit moves.",{"body":2076},{"type":7,"value":2077,"toc":2078},[],{"title":853,"searchDepth":854,"depth":854,"links":2079},[],"glossary\u002Faccelerometer","ksJj58OEPP72c3cASeHPlPiw73FfxxUbtIkoEIYW2Rc",{"id":2083,"category":2072,"definition":2084,"example":2085,"extension":858,"meta":2086,"stem":2091,"term":2092,"__hash__":2093},"glossary\u002Fglossary\u002Fbutton.md","A button is a switch you press to tell your project to do something. The code can check whether it's being pressed or not.","Pressing a doorbell is just like pressing a button, one press sends a signal that makes something happen.",{"body":2087},{"type":7,"value":2088,"toc":2089},[],{"title":853,"searchDepth":854,"depth":854,"links":2090},[],"glossary\u002Fbutton","Button","PgfcNSpG1mpSW_fVJZZMkF4D6eYiQLiyKWeq6_CXsMA",{"id":2095,"category":2072,"definition":2096,"example":2097,"extension":858,"meta":2098,"stem":2103,"term":2104,"__hash__":2105},"glossary\u002Fglossary\u002Fbuzzer.md","A buzzer is a tiny speaker that makes beeps and tones when you send it electricity. By telling it different numbers, you can make it play notes and tunes.","The beep a microwave makes when your food is ready comes from a buzzer.",{"body":2099},{"type":7,"value":2100,"toc":2101},[],{"title":853,"searchDepth":854,"depth":854,"links":2102},[],"glossary\u002Fbuzzer","Buzzer","L0-h_InzgZ_gB0Iy3IE-ojdFF0cXjdB2AxJY0QU0VpU",{"id":2107,"category":449,"definition":2108,"example":2109,"extension":858,"meta":2110,"stem":2115,"term":2116,"__hash__":2117},"glossary\u002Fglossary\u002Fcomparison-operators.md","A comparison operator checks how two things measure up, for example whether they are equal or one is bigger than the other. It gives back a simple true or false answer.","Asking \"is 6 == 6?\" gives back true, but \"is 6 == 2?\" gives back false, so your code knows whether the two numbers match.",{"body":2111},{"type":7,"value":2112,"toc":2113},[],{"title":853,"searchDepth":854,"depth":854,"links":2114},[],"glossary\u002Fcomparison-operators","Comparison Operators","PPG3NDp3Xsx9FclsvC7ertn8IDeBVjhCknFTN17UIaU",{"id":2119,"category":2120,"definition":2121,"example":2122,"extension":858,"meta":2123,"stem":2128,"term":2129,"__hash__":2130},"glossary\u002Fglossary\u002Fforever-loop.md","Programming","A forever loop repeats its instructions again and again without ever stopping (until you switch off or reset). It's perfect for anything you want to keep happening over and over.","Like a clock's second hand that keeps ticking round and round, a forever loop keeps running the same steps over and over.",{"body":2124},{"type":7,"value":2125,"toc":2126},[],{"title":853,"searchDepth":854,"depth":854,"links":2127},[],"glossary\u002Fforever-loop","Forever loop","1j2cYaiR3yKeoh54w9Vg2aWr_cEXEtj7F0WCR3_jdc0",{"id":2132,"category":2133,"definition":2134,"example":2135,"extension":858,"meta":2136,"stem":2141,"term":2142,"__hash__":2143},"glossary\u002Fglossary\u002Ffrequency.md","Electronics","A frequency is just a number that tells a buzzer which note to play. A small number makes a low sound, and a big number makes a high sound.","Setting a buzzer to a low number gives a deep, rumbly note, while a high number makes a squeaky, high-pitched one, a bit like the left and right ends of a piano.",{"body":2137},{"type":7,"value":2138,"toc":2139},[],{"title":853,"searchDepth":854,"depth":854,"links":2140},[],"glossary\u002Ffrequency","Frequency","XY4AeY0bsJaqF0XBjkEAvTSzqxdpPPLt09Z_LbZSjPg",{"id":2145,"category":2120,"definition":2146,"example":2147,"extension":858,"meta":2148,"stem":2153,"term":2154,"__hash__":2155},"glossary\u002Fglossary\u002Ffunction.md","A function is a chunk of code you give a name to, so you can use it again and again without building it from scratch each time. Think of it like a favourite recipe, you write down the steps once, then follow it whenever you need it.","Like writing out a pancake recipe once. Whenever you fancy pancakes, you just follow the recipe again rather than working it all out from scratch.",{"body":2149},{"type":7,"value":2150,"toc":2151},[],{"title":853,"searchDepth":854,"depth":854,"links":2152},[],"glossary\u002Ffunction","Function","0aEVvGRMWsAC1qXngj6QCHxCoIn1mWfHYBBi95ayuLE",{"id":2157,"category":2158,"definition":2159,"example":2160,"extension":858,"meta":2161,"stem":2166,"term":2167,"__hash__":2168},"glossary\u002Fglossary\u002Fide-code-editor.md","General","An IDE is the program where you write and run your code. A code editor lots of children and parents will already know is Scratch, where you drag blocks together to build a program. IDE stands for \"integrated development environment\".","It's like a kitchen for code: one place with all the tools you need to put your project together and test it.",{"body":2162},{"type":7,"value":2163,"toc":2164},[],{"title":853,"searchDepth":854,"depth":854,"links":2165},[],"glossary\u002Fide-code-editor","IDE (code editor)","yc7Eds8WdmrIM56FGlCmMtjhoodKwT1IUvQCC9bsvKs",{"id":2170,"category":449,"definition":2171,"example":2172,"extension":858,"meta":2173,"stem":2178,"term":2179,"__hash__":2180},"glossary\u002Fglossary\u002Fif-statement.md","An if statement checks whether something is true, and only runs its instructions when it is. It's how code makes decisions.","\"If it's cold, put on a coat.\" If it's warm, you skip the coat, the action only happens when the check is true.",{"body":2174},{"type":7,"value":2175,"toc":2176},[],{"title":853,"searchDepth":854,"depth":854,"links":2177},[],"glossary\u002Fif-statement","If statement","3uYmpX5sGUnkc327qCP_EkL6IGkFiginfOP39Kstry8",{"id":2182,"category":2120,"definition":2183,"example":2184,"extension":858,"meta":2185,"stem":2190,"term":2191,"__hash__":2192},"glossary\u002Fglossary\u002Fimporting-libraries.md","A library is a ready-made bundle of code that someone else has written for you. Importing a library means bringing it into your project so you can use all its ready-made commands and features, without building them from scratch.","It's like borrowing a recipe book from the library. Instead of working out every recipe yourself, you bring the book in and use the recipes whenever you need them.",{"body":2186},{"type":7,"value":2187,"toc":2188},[],{"title":853,"searchDepth":854,"depth":854,"links":2189},[],"glossary\u002Fimporting-libraries","Importing Libraries","Wqj3o2kxbFQa44LtzhYfeDYluwIPxxWChkL00OD1LqI",{"id":2194,"category":2195,"definition":2196,"example":2197,"extension":858,"meta":2198,"stem":2203,"term":2204,"__hash__":2205},"glossary\u002Fglossary\u002Finteger.md","Data & Variables","An integer is just a whole number, like 1, 2 or 3. It has no bits after a dot, so 4 is an integer, but 4.5 isn't.","Counting down 3… 2… 1… uses integers, but a price like £4.99 isn't an integer because it has numbers after the dot.",{"body":2199},{"type":7,"value":2200,"toc":2201},[],{"title":853,"searchDepth":854,"depth":854,"links":2202},[],"glossary\u002Finteger","Integer","lktbVeg3VEBLF2Jg3R_EKdjEowVZeabE1gPnGpI2OXY",{"id":2207,"category":2072,"definition":2208,"example":2209,"extension":858,"meta":2210,"stem":2215,"term":2216,"__hash__":2217},"glossary\u002Fglossary\u002Fled.md","An LED is a tiny light you can switch on and off (and sometimes change colour) with your code. LED is short for \"light-emitting diode\".","The little standby light on a TV is an LED, your code can flash one on and off the same way.",{"body":2211},{"type":7,"value":2212,"toc":2213},[],{"title":853,"searchDepth":854,"depth":854,"links":2214},[],"glossary\u002Fled","LED","M41j-xq46HhMvOjtpYSjfy0ypnoMYVzgeqVGSuyVciY",{"id":2219,"category":2072,"definition":2220,"example":2221,"extension":858,"meta":2222,"stem":2227,"term":2228,"__hash__":2229},"glossary\u002Fglossary\u002Fled-matrix.md","The LED matrix is the grid of little red lights on the front of the micro:bit. By switching them on and off in patterns, your code can show numbers, letters and tiny pictures.","Like a mini scoreboard made of dots, the LED matrix lights up to spell out your step count.",{"body":2223},{"type":7,"value":2224,"toc":2225},[],{"title":853,"searchDepth":854,"depth":854,"links":2226},[],"glossary\u002Fled-matrix","LED Matrix","KfPJAm7v5EXlm2ejZZLldfB4w7zOMZQhbrmsqxpqJi8",{"id":2231,"category":2072,"definition":2232,"example":2233,"extension":858,"meta":2234,"stem":2239,"term":2240,"__hash__":2241},"glossary\u002Fglossary\u002Flight-sensor.md","A light sensor is a little part that measures how bright or dark it is around it, then turns that into a number your code can read. As the light changes, so does the number.","Like the automatic headlights on a car that switch on when it gets dark, a light sensor notices the light dropping and lets your code react.",{"body":2235},{"type":7,"value":2236,"toc":2237},[],{"title":853,"searchDepth":854,"depth":854,"links":2238},[],"glossary\u002Flight-sensor","Light Sensor","tEERMTJO24JmYYlQoIO7DxY9yXg0GNehs78E_LQL28U",{"id":2243,"category":2072,"definition":2244,"example":2245,"extension":858,"meta":2246,"stem":2251,"term":24,"__hash__":2252},"glossary\u002Fglossary\u002Fmicro-bit.md","The micro:bit is a tiny programmable computer, about the size of a matchbox, made for learning to code. It has two buttons, a grid of little red LED lights and built-in sensors that can detect movement, light and temperature.","A bit like a pocket-sized computer you can program yourself, a micro:bit can become a step counter, a thermometer or even a simple game.",{"body":2247},{"type":7,"value":2248,"toc":2249},[],{"title":853,"searchDepth":854,"depth":854,"links":2250},[],"glossary\u002Fmicro-bit","GZPIPrw-9_LkW4seKGxZt6hAdg8MO_A_wOS-mN4qDTg",{"id":2254,"category":2158,"definition":2255,"example":2256,"extension":858,"meta":2257,"stem":2262,"term":2263,"__hash__":2264},"glossary\u002Fglossary\u002Fmillisecond.md","A millisecond is a tiny slice of time. There are 1,000 of them in just one second! That's why it's perfect for measuring things that happen really fast.","A blink of an eye takes around 300 milliseconds, so a really quick button press might be even faster than a blink.",{"body":2258},{"type":7,"value":2259,"toc":2260},[],{"title":853,"searchDepth":854,"depth":854,"links":2261},[],"glossary\u002Fmillisecond","Millisecond","2TwuImc8S9MyMSqRFO3i6iHVCdsxyJ_S9N_BxGbZL-8",{"id":2266,"category":2072,"definition":2267,"example":2268,"extension":858,"meta":2269,"stem":2274,"term":2275,"__hash__":2276},"glossary\u002Fglossary\u002Fmodule.md","A module is a small part that does one job, like a buzzer, a button or a screen. You connect modules to the main board to give your project new powers.","Like adding different attachments to a toy, each module snaps on to add a new ability, sound, light or buttons.",{"body":2270},{"type":7,"value":2271,"toc":2272},[],{"title":853,"searchDepth":854,"depth":854,"links":2273},[],"glossary\u002Fmodule","Module","IDLrS2CrlwNauzAWoCd7V16aO_ygDWyjp11bMsfuwO0",{"id":2278,"category":2072,"definition":2279,"example":2280,"extension":858,"meta":2281,"stem":2286,"term":2287,"__hash__":2288},"glossary\u002Fglossary\u002Fmotor-controller.md","A motor controller is the part that sits between your board and a motor, passing on the right amount of power so the motor moves the way your code asks.","Like a remote control for a toy car, it takes your instructions and makes the motor do them.",{"body":2282},{"type":7,"value":2283,"toc":2284},[],{"title":853,"searchDepth":854,"depth":854,"links":2285},[],"glossary\u002Fmotor-controller","Motor controller","McSSBLd3fPtYq-o2LUQBhW3pBeEmMSjF6cnb2O9ectE",{"id":2290,"category":2072,"definition":2291,"example":2292,"extension":858,"meta":2293,"stem":2298,"term":2299,"__hash__":2300},"glossary\u002Fglossary\u002Foled-screen.md","An OLED screen is a small display that shows words, numbers and pictures from your code. On some kits it's labelled the \"LED display\", but it's the same little screen.","Like the small screen on a fitness watch showing your steps, an OLED screen can show a score or a countdown.",{"body":2294},{"type":7,"value":2295,"toc":2296},[],{"title":853,"searchDepth":854,"depth":854,"links":2297},[],"glossary\u002Foled-screen","OLED screen","14SaCtmWj71MOziFuPIW377cynK4FRv5TsdEx4fGGFk",{"id":2302,"category":2072,"definition":2303,"example":2304,"extension":858,"meta":2305,"stem":2310,"term":2311,"__hash__":2312},"glossary\u002Fglossary\u002Fpicobricks.md","PicoBricks is an all-in-one coding kit that joins up handy parts, like a screen, a buzzer, buttons and lights, onto one board, so you can build projects without any fiddly wiring.","It's a bit like a Lego baseboard for electronics: everything clicks together in one place, ready to code.",{"body":2306},{"type":7,"value":2307,"toc":2308},[],{"title":853,"searchDepth":854,"depth":854,"links":2309},[],"glossary\u002Fpicobricks","PicoBricks","TeGs24I-3fkAdlpiuQPPBDUO8EKBe8PS1ewHaj-w5_s",{"id":2314,"category":2072,"definition":2315,"example":2316,"extension":858,"meta":2317,"stem":2322,"term":2323,"__hash__":2324},"glossary\u002Fglossary\u002Fpotentiometer.md","A potentiometer is a knob or dial that controls how much electricity flows through a circuit. Think of it like a tap for water: turn it one way and more comes out, turn it the other way and less comes out.","A volume dial on a speaker is a potentiometer, turn it up for louder sound and down for quieter.",{"body":2318},{"type":7,"value":2319,"toc":2320},[],{"title":853,"searchDepth":854,"depth":854,"links":2321},[],"glossary\u002Fpotentiometer","Potentiometer","ohP2krcKZLkMtpI44R32nhDVwImLmSBQWP6SOArsh6M",{"id":2326,"category":2120,"definition":2327,"example":2328,"extension":858,"meta":2329,"stem":2334,"term":2335,"__hash__":2336},"glossary\u002Fglossary\u002Frandom.md","Random means you can't guess what's coming next, a bit like rolling a dice. The computer picks for you, so you get a different surprise each time.","Asking a computer for a random number between 1 and 6 is just like rolling a dice, you never know if you'll get a 1 or a 6.",{"body":2330},{"type":7,"value":2331,"toc":2332},[],{"title":853,"searchDepth":854,"depth":854,"links":2333},[],"glossary\u002Frandom","Random","LkGfQKwUNfJ_TPXihwPveX2JeJ9-BB7DpUire9a2pqI",{"id":2338,"category":2072,"definition":2339,"example":2340,"extension":858,"meta":2341,"stem":2346,"term":2347,"__hash__":2348},"glossary\u002Fglossary\u002Fraspberry-pi-pico.md","The Raspberry Pi Pico is a tiny, low-cost computer chip on a small board. It's the \"brain\" that stores your code and tells the other parts what to do.","It's like the brain inside a toy robot, small enough to fit in your hand, but clever enough to run your whole project.",{"body":2342},{"type":7,"value":2343,"toc":2344},[],{"title":853,"searchDepth":854,"depth":854,"links":2345},[],"glossary\u002Fraspberry-pi-pico","Raspberry Pi Pico","HVa7r-PC6I5-DVcDdOULsBHP6h7V4SafhFtdazcSWYg",{"id":2350,"category":2120,"definition":2351,"example":2352,"extension":858,"meta":2353,"stem":2358,"term":2359,"__hash__":2360},"glossary\u002Fglossary\u002Frepeat-loop.md","A repeat loop does its instructions a set number of times, then stops. You tell it exactly how many goes you want.","\"Repeat 3 times: blow out a candle.\" After the third candle, the loop is finished, no matter what.",{"body":2354},{"type":7,"value":2355,"toc":2356},[],{"title":853,"searchDepth":854,"depth":854,"links":2357},[],"glossary\u002Frepeat-loop","Repeat loop","YC2iTUQ841lfmltd6Pkq89uuQbk29RWgR-rWs7MvjJ4",{"id":2362,"category":2072,"definition":2363,"example":2364,"extension":858,"meta":2365,"stem":2370,"term":2371,"__hash__":2372},"glossary\u002Fglossary\u002Frgb-led.md","An RGB LED is a tiny light that can glow in any colour you like. It mixes red, green and blue light in different amounts, a bit like mixing paints, to make all sorts of colours.","Like the colour-changing lights some people put behind their TV, an RGB LED can shift from red to green to blue and everything in between.",{"body":2366},{"type":7,"value":2367,"toc":2368},[],{"title":853,"searchDepth":854,"depth":854,"links":2369},[],"glossary\u002Frgb-led","RGB LED","mIu-76nYeQtI-NsTMcvPueLH11JE0fC5X2jJxBmKwPU",{"id":2374,"category":2072,"definition":2375,"example":2376,"extension":858,"meta":2377,"stem":2382,"term":2383,"__hash__":2384},"glossary\u002Fglossary\u002Fservo-motor.md","A servo motor is a special motor that turns to an exact position you tell it, like 0 or 90 degrees, instead of just spinning round and round.","Like the hand on a clock moving to point at a number, a servo turns to the exact angle you ask for.",{"body":2378},{"type":7,"value":2379,"toc":2380},[],{"title":853,"searchDepth":854,"depth":854,"links":2381},[],"glossary\u002Fservo-motor","Servo motor","IFtMLIEoNZ746ebquvkvp-PAqDQObQACMiWUTb3rfZ8",{"id":2386,"category":2072,"definition":2387,"example":2388,"extension":858,"meta":2389,"stem":2394,"term":2395,"__hash__":2396},"glossary\u002Fglossary\u002Ftemperature-sensor.md","A temperature sensor is a little part that measures how warm or cold it is around it, then turns that into a number your code can read. As the room heats up or cools down, the number changes too.","Like the thermometer that tells you if you've got a temperature when you're poorly, a temperature sensor measures the warmth around it and gives your code a number to work with.",{"body":2390},{"type":7,"value":2391,"toc":2392},[],{"title":853,"searchDepth":854,"depth":854,"links":2393},[],"glossary\u002Ftemperature-sensor","Temperature sensor","UbSScS-TCPLSFDjnxsaFltpoKbORTAOaxh68b_-FMw8",{"id":2398,"category":449,"definition":2399,"example":2400,"extension":858,"meta":2401,"stem":2406,"term":2407,"__hash__":2408},"glossary\u002Fglossary\u002Fthreshold.md","A threshold is a cut-off number you pick to help your code make a decision. The code checks whether a value is above or below it, then acts. It's like drawing a line and asking \"are we over it or under it?\"","Like setting a bedtime of 8 o'clock: before 8 you're still up, after 8 it's lights out. The time is your threshold.",{"body":2402},{"type":7,"value":2403,"toc":2404},[],{"title":853,"searchDepth":854,"depth":854,"links":2405},[],"glossary\u002Fthreshold","Threshold","xikcgh-PcWY0Z_HhDY16B8SLJLbL0oJD8WUU3KpHqvY",{"id":2410,"category":2195,"definition":2411,"example":2412,"extension":858,"meta":2413,"stem":2418,"term":2419,"__hash__":2420},"glossary\u002Fglossary\u002Fvariable.md","A variable is something that can change. Think of it like a labelled box: you pop something inside, and the label tells you what it is. You can swap what's inside whenever you like.","A variable called score might start at 0, then change to 1, 2 and 3 as you collect points in a game.",{"body":2414},{"type":7,"value":2415,"toc":2416},[],{"title":853,"searchDepth":854,"depth":854,"links":2417},[],"glossary\u002Fvariable","Variable","nlzJUTSGqyIAKSbopFF01oPBuJT59zOT7MSoCpOMp1E",{"id":2422,"category":2120,"definition":2423,"example":2424,"extension":858,"meta":2425,"stem":2430,"term":2431,"__hash__":2432},"glossary\u002Fglossary\u002Fwhile-loop.md","A while loop keeps repeating its instructions for as long as something stays true. The moment that thing stops being true, the loop stops.","\"While it's still raining, keep the umbrella up.\" As soon as the rain stops, you put the umbrella down, and the loop ends.",{"body":2426},{"type":7,"value":2427,"toc":2428},[],{"title":853,"searchDepth":854,"depth":854,"links":2429},[],"glossary\u002Fwhile-loop","While loop","igK-e_snGhkP0kgSn6sPO7YQybQ0WpDfQMB0_8I2iZg",[2434,2440,2446,2452,2458,2464,2470,2476,2482,2488,2494,2500,2506,2512,2518,2524,2530,2536,2542,2548,2554,2560,2566,2572,2578,2584,2590,2596,2602,2608],{"id":2071,"category":2072,"definition":2073,"example":2074,"extension":858,"meta":2435,"stem":2080,"term":460,"__hash__":2081},{"body":2436},{"type":7,"value":2437,"toc":2438},[],{"title":853,"searchDepth":854,"depth":854,"links":2439},[],{"id":2083,"category":2072,"definition":2084,"example":2085,"extension":858,"meta":2441,"stem":2091,"term":2092,"__hash__":2093},{"body":2442},{"type":7,"value":2443,"toc":2444},[],{"title":853,"searchDepth":854,"depth":854,"links":2445},[],{"id":2095,"category":2072,"definition":2096,"example":2097,"extension":858,"meta":2447,"stem":2103,"term":2104,"__hash__":2105},{"body":2448},{"type":7,"value":2449,"toc":2450},[],{"title":853,"searchDepth":854,"depth":854,"links":2451},[],{"id":2107,"category":449,"definition":2108,"example":2109,"extension":858,"meta":2453,"stem":2115,"term":2116,"__hash__":2117},{"body":2454},{"type":7,"value":2455,"toc":2456},[],{"title":853,"searchDepth":854,"depth":854,"links":2457},[],{"id":2119,"category":2120,"definition":2121,"example":2122,"extension":858,"meta":2459,"stem":2128,"term":2129,"__hash__":2130},{"body":2460},{"type":7,"value":2461,"toc":2462},[],{"title":853,"searchDepth":854,"depth":854,"links":2463},[],{"id":2132,"category":2133,"definition":2134,"example":2135,"extension":858,"meta":2465,"stem":2141,"term":2142,"__hash__":2143},{"body":2466},{"type":7,"value":2467,"toc":2468},[],{"title":853,"searchDepth":854,"depth":854,"links":2469},[],{"id":2145,"category":2120,"definition":2146,"example":2147,"extension":858,"meta":2471,"stem":2153,"term":2154,"__hash__":2155},{"body":2472},{"type":7,"value":2473,"toc":2474},[],{"title":853,"searchDepth":854,"depth":854,"links":2475},[],{"id":2157,"category":2158,"definition":2159,"example":2160,"extension":858,"meta":2477,"stem":2166,"term":2167,"__hash__":2168},{"body":2478},{"type":7,"value":2479,"toc":2480},[],{"title":853,"searchDepth":854,"depth":854,"links":2481},[],{"id":2170,"category":449,"definition":2171,"example":2172,"extension":858,"meta":2483,"stem":2178,"term":2179,"__hash__":2180},{"body":2484},{"type":7,"value":2485,"toc":2486},[],{"title":853,"searchDepth":854,"depth":854,"links":2487},[],{"id":2182,"category":2120,"definition":2183,"example":2184,"extension":858,"meta":2489,"stem":2190,"term":2191,"__hash__":2192},{"body":2490},{"type":7,"value":2491,"toc":2492},[],{"title":853,"searchDepth":854,"depth":854,"links":2493},[],{"id":2194,"category":2195,"definition":2196,"example":2197,"extension":858,"meta":2495,"stem":2203,"term":2204,"__hash__":2205},{"body":2496},{"type":7,"value":2497,"toc":2498},[],{"title":853,"searchDepth":854,"depth":854,"links":2499},[],{"id":2207,"category":2072,"definition":2208,"example":2209,"extension":858,"meta":2501,"stem":2215,"term":2216,"__hash__":2217},{"body":2502},{"type":7,"value":2503,"toc":2504},[],{"title":853,"searchDepth":854,"depth":854,"links":2505},[],{"id":2219,"category":2072,"definition":2220,"example":2221,"extension":858,"meta":2507,"stem":2227,"term":2228,"__hash__":2229},{"body":2508},{"type":7,"value":2509,"toc":2510},[],{"title":853,"searchDepth":854,"depth":854,"links":2511},[],{"id":2231,"category":2072,"definition":2232,"example":2233,"extension":858,"meta":2513,"stem":2239,"term":2240,"__hash__":2241},{"body":2514},{"type":7,"value":2515,"toc":2516},[],{"title":853,"searchDepth":854,"depth":854,"links":2517},[],{"id":2254,"category":2158,"definition":2255,"example":2256,"extension":858,"meta":2519,"stem":2262,"term":2263,"__hash__":2264},{"body":2520},{"type":7,"value":2521,"toc":2522},[],{"title":853,"searchDepth":854,"depth":854,"links":2523},[],{"id":2266,"category":2072,"definition":2267,"example":2268,"extension":858,"meta":2525,"stem":2274,"term":2275,"__hash__":2276},{"body":2526},{"type":7,"value":2527,"toc":2528},[],{"title":853,"searchDepth":854,"depth":854,"links":2529},[],{"id":2278,"category":2072,"definition":2279,"example":2280,"extension":858,"meta":2531,"stem":2286,"term":2287,"__hash__":2288},{"body":2532},{"type":7,"value":2533,"toc":2534},[],{"title":853,"searchDepth":854,"depth":854,"links":2535},[],{"id":2290,"category":2072,"definition":2291,"example":2292,"extension":858,"meta":2537,"stem":2298,"term":2299,"__hash__":2300},{"body":2538},{"type":7,"value":2539,"toc":2540},[],{"title":853,"searchDepth":854,"depth":854,"links":2541},[],{"id":2302,"category":2072,"definition":2303,"example":2304,"extension":858,"meta":2543,"stem":2310,"term":2311,"__hash__":2312},{"body":2544},{"type":7,"value":2545,"toc":2546},[],{"title":853,"searchDepth":854,"depth":854,"links":2547},[],{"id":2314,"category":2072,"definition":2315,"example":2316,"extension":858,"meta":2549,"stem":2322,"term":2323,"__hash__":2324},{"body":2550},{"type":7,"value":2551,"toc":2552},[],{"title":853,"searchDepth":854,"depth":854,"links":2553},[],{"id":2362,"category":2072,"definition":2363,"example":2364,"extension":858,"meta":2555,"stem":2370,"term":2371,"__hash__":2372},{"body":2556},{"type":7,"value":2557,"toc":2558},[],{"title":853,"searchDepth":854,"depth":854,"links":2559},[],{"id":2326,"category":2120,"definition":2327,"example":2328,"extension":858,"meta":2561,"stem":2334,"term":2335,"__hash__":2336},{"body":2562},{"type":7,"value":2563,"toc":2564},[],{"title":853,"searchDepth":854,"depth":854,"links":2565},[],{"id":2338,"category":2072,"definition":2339,"example":2340,"extension":858,"meta":2567,"stem":2346,"term":2347,"__hash__":2348},{"body":2568},{"type":7,"value":2569,"toc":2570},[],{"title":853,"searchDepth":854,"depth":854,"links":2571},[],{"id":2350,"category":2120,"definition":2351,"example":2352,"extension":858,"meta":2573,"stem":2358,"term":2359,"__hash__":2360},{"body":2574},{"type":7,"value":2575,"toc":2576},[],{"title":853,"searchDepth":854,"depth":854,"links":2577},[],{"id":2374,"category":2072,"definition":2375,"example":2376,"extension":858,"meta":2579,"stem":2382,"term":2383,"__hash__":2384},{"body":2580},{"type":7,"value":2581,"toc":2582},[],{"title":853,"searchDepth":854,"depth":854,"links":2583},[],{"id":2386,"category":2072,"definition":2387,"example":2388,"extension":858,"meta":2585,"stem":2394,"term":2395,"__hash__":2396},{"body":2586},{"type":7,"value":2587,"toc":2588},[],{"title":853,"searchDepth":854,"depth":854,"links":2589},[],{"id":2398,"category":449,"definition":2399,"example":2400,"extension":858,"meta":2591,"stem":2406,"term":2407,"__hash__":2408},{"body":2592},{"type":7,"value":2593,"toc":2594},[],{"title":853,"searchDepth":854,"depth":854,"links":2595},[],{"id":2410,"category":2195,"definition":2411,"example":2412,"extension":858,"meta":2597,"stem":2418,"term":2419,"__hash__":2420},{"body":2598},{"type":7,"value":2599,"toc":2600},[],{"title":853,"searchDepth":854,"depth":854,"links":2601},[],{"id":2422,"category":2120,"definition":2423,"example":2424,"extension":858,"meta":2603,"stem":2430,"term":2431,"__hash__":2432},{"body":2604},{"type":7,"value":2605,"toc":2606},[],{"title":853,"searchDepth":854,"depth":854,"links":2607},[],{"id":2243,"category":2072,"definition":2244,"example":2245,"extension":858,"meta":2609,"stem":2251,"term":24,"__hash__":2252},{"body":2610},{"type":7,"value":2611,"toc":2612},[],{"title":853,"searchDepth":854,"depth":854,"links":2613},[],1788101568061]