[{"data":1,"prerenderedAt":2090},["ShallowReactive",2],{"tutorial:\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors":3,"tutorial-steps:\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors":671,"kit-\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors":1108,"key-words-glossary":1545,"glossary":1909},{"id":4,"title":5,"body":6,"description":650,"draft":652,"duration":653,"extension":654,"image":655,"kit":656,"language":660,"level":661,"meta":662,"navigation":663,"path":664,"pdf":665,"platform":666,"seo":667,"stem":668,"youtube":669,"__hash__":670},"tutorials\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002Findex.md","Code Rock Paper Scissors on a micro:bit with MakeCode",{"type":7,"value":8,"toc":649},"minimark",[9],[10,11,12,81,87,94,163,203,262,341,376,455,517,536,565],"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,60,63,71,76],"ul",{},[55,56,57,58],"li",{},"How to create a ",[21,59,37],{"slug":37},[55,61,62],{},"How to use the on shake function",[55,64,65,66,70],{},"How to use ",[21,67,69],{"slug":68},"if-statement","if",", else if and else statements",[55,72,65,73,75],{},[21,74,33],{"slug":33}," numbers",[55,77,78,79],{},"How to show patterns on the ",[21,80,29],{"slug":28},[13,82,84],{"title":83},"What you'll need",[85,86],"what-youll-need",{},[13,88,90],{"title":89},"Key words",[91,92],"key-words",{"terms":93},"variable,random,led-matrix,accelerometer,if-statement",[13,95,97,102,129,136,140],{"title":96},"Navigating to the MakeCode Editor",[98,99,101],"h3",{"id":100},"on-a-computer","On a Computer",[103,104,105,108,119],"ol",{},[55,106,107],{},"Open your favourite web browser. We recommend either Google Chrome or Microsoft Edge.",[55,109,110,111,118],{},"In the Address bar type ",[112,113,117],"a",{"href":114,"rel":115},"https:\u002F\u002Fmakecode.microbit.org\u002F#",[116],"nofollow","makecode.microbit.org",".",[55,120,121,122,125,126,118],{},"Select ",[48,123,124],{},"New Project"," and give it the name ",[48,127,128],{},"RockPaperScissors",[17,130,131],{},[132,133],"img",{"alt":134,"src":135},"The MakeCode code area","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Fmicrofit\u002FCodeArea.webp",[98,137,139],{"id":138},"on-a-tablet-or-phone","On a Tablet or Phone",[103,141,142,151,156],{},[55,143,144,145,148,149,118],{},"Open the ",[48,146,147],{},"micro:bit app",". If you don't have the app yet you can download it from your devices app store by searching for ",[48,150,24],{},[55,152,121,153,118],{},[48,154,155],{},"Create Code",[55,157,121,158,160,161,118],{},[48,159,124],{}," and name it ",[48,162,128],{},[13,164,166,197],{"title":165},"Set up the Code Area",[103,167,168,180,187],{},[55,169,170,171,175,176,179],{},"Select the ",[172,173,174],"code",{},"on start"," block and drop it on the ",[48,177,178],{},"bin"," icon to delete it.",[55,181,170,182,175,185,179],{},[172,183,184],{},"forever",[48,186,178],{},[55,188,121,189,192,193,196],{},[48,190,191],{},"Input",". Select a ",[172,194,195],{},"on shake"," block and drop it within the code area.",[17,198,199],{},[132,200],{"alt":201,"src":202},"Setting up the code area","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS1_SettingUpCodeArea.webp",[13,204,206,254,257],{"title":205},"Create and Set choice Variable",[103,207,208,221,231],{},[55,209,121,210,213,214,217,218,118],{},[48,211,212],{},"Variables",", choose ",[48,215,216],{},"Make a Variable",", and name it ",[48,219,220],{},"choice",[55,222,223,224,227,228,230],{},"Snap a ",[172,225,226],{},"set choice to"," block inside the ",[172,229,195],{}," block.",[55,232,121,233,192,236,239,240,242,243,246,247,250,251,118],{},[48,234,235],{},"Math",[172,237,238],{},"pick random 0 to 10"," block and snap it onto the ",[172,241,226],{}," block where it says ",[48,244,245],{},"0",". Change ",[48,248,249],{},"10"," to ",[48,252,253],{},"2",[17,255,256],{},"Everytime the micro:bit is shaken it will choose a number between 0 and 2.",[17,258,259],{},[132,260],{"alt":205,"src":261},"\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS2_CreateAndSetChoiceVariable.webp",[13,263,265,323,329,335],{"title":264},"Creating the if Condition",[103,266,267,280,292,305,317],{},[55,268,121,269,272,273,276,277,230],{},[48,270,271],{},"Logic",". Select an ",[172,274,275],{},"If true then else"," block and snap it below the ",[172,278,279],{},"set choice to pick random 0 to 2",[55,281,121,282,192,284,239,287,242,289,118],{},[48,283,271],{},[172,285,286],{},"0 = 0",[172,288,69],{},[48,290,291],{},"true",[55,293,121,294,192,296,239,298,300,301,304],{},[48,295,212],{},[172,297,220],{},[172,299,69],{}," block before the ",[48,302,303],{},"="," sign.",[55,306,121,307,192,310,313,314,230],{},[48,308,309],{},"Basic",[172,311,312],{},"show leds"," block and snap it inside the ",[172,315,316],{},"if choice = 0",[55,318,319,320,118],{},"Make the following pattern by selecting the squares to represent ",[48,321,322],{},"paper",[17,324,325],{},[132,326],{"alt":327,"src":328},"Creating a represenation of paper","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS3_PaperRepresentation.webp",[17,330,331,332,118],{},"This piece of code will check to see if choice is equal to zero and if it is it will display the paper icon on the ",[21,333,334],{"slug":28},"LED Matrix",[17,336,337],{},[132,338],{"alt":339,"src":340},"Creating the code for if choice is equal to 0","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS3_CreatingIfCondition.webp",[13,342,344,361,367,370],{"title":343},"Create the else Condition",[103,345,346,355],{},[55,347,121,348,192,350,313,352,230],{},[48,349,309],{},[172,351,312],{},[172,353,354],{},"else",[55,356,357,358,118],{},"Create the following pattern by selecting the squares to represent ",[48,359,360],{},"rock",[17,362,363],{},[132,364],{"alt":365,"src":366},"Creating the representation of rock","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS4_RockRepresentation.webp",[17,368,369],{},"For now the else block is the catch-all: if choice isn't 0, it displays the rock icon on the LED matrix. In the next step we'll add an else if branch for choice = 1, which leaves the else handling the last value, 2.",[17,371,372],{},[132,373],{"alt":374,"src":375},"Creating the else condition","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS4_CreatingElseCondition.webp",[13,377,379,387,393,440,446,449],{"title":378},"Create the else if Condition",[17,380,170,381,384,385,118],{},[48,382,383],{},"+"," below ",[172,386,354],{},[17,388,389],{},[132,390],{"alt":391,"src":392},"Adding the else if condition","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS5_AddingElseIfCondition.webp",[103,394,396,410,426,435],{"start":395},2,[55,397,121,398,401,402,239,404,242,407,118],{},[48,399,400],{},"Logic."," Select a ",[172,403,286],{},[172,405,406],{},"else if",[48,408,409],{},"false",[55,411,121,412,192,414,239,416,300,418,420,421,250,423,118],{},[48,413,212],{},[172,415,220],{},[172,417,406],{},[48,419,303],{}," sign. Change the ",[48,422,245],{},[48,424,425],{},"1",[55,427,121,428,192,430,313,432,230],{},[48,429,309],{},[172,431,312],{},[172,433,434],{},"else if choice = 1",[55,436,357,437,118],{},[48,438,439],{},"scissors",[17,441,442],{},[132,443],{"alt":444,"src":445},"Scissors Representation","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS5_ScissorsRepresentation.webp",[17,447,448],{},"This piece of code checks to see if choice is equal to 1. If it is, it displays the scissors icon to the LED matrix.",[17,450,451],{},[132,452],{"alt":453,"src":454},"Creating the else if condition","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FS5_CreatingElseIfCondition.webp",[13,456,458,462,495,501,505,514],{"title":457},"Downloading Your Code",[98,459,461],{"id":460},"using-a-computer","Using a Computer",[103,463,464,473,478,481,491],{},[55,465,170,466,469,470,118],{},[48,467,468],{},"three dots"," next to ",[48,471,472],{},"Download",[55,474,121,475,118],{},[48,476,477],{},"Connect Device",[55,479,480],{},"A pop-up will show you how to connect the micro:bit to the computer. Keep following the on-screen instructions.",[55,482,121,483,486,487,490],{},[48,484,485],{},"BBC micro:bit XXX"," and select ",[48,488,489],{},"Connect",". The XXX is your own micro:bit's name, so don't worry if it looks a little different.",[55,492,121,493,118],{},[48,494,472],{},[17,496,497],{},[132,498],{"alt":499,"src":500},"Downloading your code","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Fmicrofit\u002FDownloadingCode.webp",[98,502,504],{"id":503},"using-a-tablet-or-phone","Using a tablet or phone",[103,506,507,511],{},[55,508,121,509,118],{},[48,510,472],{},[55,512,513],{},"Follow the on-screen instructions to pair the micro:bit with the micro:bit app.",[17,515,516],{},"Once you've finished the on-screen steps, your code downloads to your micro:bit.",[13,518,520,523],{"title":519},"Run it and Watch",[17,521,522],{},"Shake the micro:bit to see either a rock, paper, or scissors icon display on your micro:bit. Remember the choice is random, so you may have to shake it a few times to see all three icons.",[17,524,525,528,529,469,532,535],{},[48,526,527],{},"Don't have a micro:bit?"," We can test it on the MakeCode editor by selecting the ",[48,530,531],{},"white dot",[48,533,534],{},"Shake"," on the micro:bit Simulator and watch it select the rock, paper, or scissors icon and display it on the virtual LED matrix.",[13,537,539],{"title":538},"Try it yourself",[540,541,542,559],"try-it",{},[17,543,544,547,548,551,552,555,556,558],{},[48,545,546],{},"Challenge:"," Can you add a sound so your micro:bit gives a little beep each time it makes a choice? Try snapping a ",[172,549,550],{},"play tone"," block from ",[48,553,554],{},"Music"," inside your ",[172,557,195],{}," block, just after you set the choice. For an extra challenge, play a different note for rock, paper and scissors!",[17,560,561],{},[562,563,564],"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,566,568],{"title":567},"Stuck? Quick fixes",[569,570,571,584],"table",{},[572,573,574],"thead",{},[575,576,577,581],"tr",{},[578,579,580],"th",{},"Problem",[578,582,583],{},"Try this",[585,586,587,598,606,617,641],"tbody",{},[575,588,589,593],{},[590,591,592],"td",{},"Nothing happens when I shake it",[590,594,595,596,230],{},"Give it a firm shake, not too gentle. Also check your blocks are snapped inside the ",[172,597,195],{},[575,599,600,603],{},[590,601,602],{},"The same icon keeps showing",[590,604,605],{},"That's normal! The choice is random, so shake a few more times and the others will appear.",[575,607,608,611],{},[590,609,610],{},"My icons look wrong or blank",[590,612,613,614,616],{},"Open each ",[172,615,312],{}," block and check you've selected the right squares for rock, paper and scissors.",[575,618,619,622],{},[590,620,621],{},"It only ever shows two icons",[590,623,624,625,627,628,631,632,635,636,250,638,640],{},"Check your ",[172,626,406],{}," is set to ",[172,629,630],{},"choice = 1",", and that ",[172,633,634],{},"pick random"," goes from ",[48,637,245],{},[48,639,253],{}," (not 0 to 10).",[575,642,643,646],{},[590,644,645],{},"My code won't download to the micro:bit",[590,647,648],{},"Use a data USB cable (not a charge-only one), make sure the micro:bit is paired, and try a different USB port.",{"title":650,"searchDepth":395,"depth":395,"links":651},"",[],false,"10 mins","md","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002FRockPaperscissors_Cover.png",[657,24,658,659],"The micro:bit MakeCode editor","micro USB cable","battery pack for the micro:bit (optional)","makecode","Beginner",{},true,"\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors","\u002Flearn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002Frock-paper-scissors.pdf","microbit",{"title":5,"description":650},"learn\u002Fmicrobit\u002Fmakecode\u002Frock-paper-scissors\u002Findex",null,"BLqnFPpmjH72pHwYFMWSx4gnLtd1Gl2DOgKbmdbaq2A",{"id":4,"title":5,"body":672,"description":650,"draft":652,"duration":653,"extension":654,"image":655,"kit":1105,"language":660,"level":661,"meta":1106,"navigation":663,"path":664,"pdf":665,"platform":666,"seo":1107,"stem":668,"youtube":669,"__hash__":670},{"type":7,"value":673,"toc":1103},[674],[10,675,676,714,718,722,765,791,829,885,911,971,1015,1027,1045],{},[13,677,678,688],{"title":15},[17,679,19,680,25,682,30,684,34,686,39],{},[21,681,24],{"slug":23},[21,683,29],{"slug":28},[21,685,33],{"slug":33},[21,687,38],{"slug":37},[41,689,690,694],{"color":43,"icon":44},[17,691,692],{},[48,693,50],{},[52,695,696,700,702,706,710],{},[55,697,57,698],{},[21,699,37],{"slug":37},[55,701,62],{},[55,703,65,704,70],{},[21,705,69],{"slug":68},[55,707,65,708,75],{},[21,709,33],{"slug":33},[55,711,78,712],{},[21,713,29],{"slug":28},[13,715,716],{"title":83},[85,717],{},[13,719,720],{"title":89},[91,721],{"terms":93},[13,723,724,726,741,745,747],{"title":96},[98,725,101],{"id":100},[103,727,728,730,735],{},[55,729,107],{},[55,731,110,732,118],{},[112,733,117],{"href":114,"rel":734},[116],[55,736,121,737,125,739,118],{},[48,738,124],{},[48,740,128],{},[17,742,743],{},[132,744],{"alt":134,"src":135},[98,746,139],{"id":138},[103,748,749,755,759],{},[55,750,144,751,148,753,118],{},[48,752,147],{},[48,754,24],{},[55,756,121,757,118],{},[48,758,155],{},[55,760,121,761,160,763,118],{},[48,762,124],{},[48,764,128],{},[13,766,767,787],{"title":165},[103,768,769,775,781],{},[55,770,170,771,175,773,179],{},[172,772,174],{},[48,774,178],{},[55,776,170,777,175,779,179],{},[172,778,184],{},[48,780,178],{},[55,782,121,783,192,785,196],{},[48,784,191],{},[172,786,195],{},[17,788,789],{},[132,790],{"alt":201,"src":202},[13,792,793,823,825],{"title":205},[103,794,795,803,809],{},[55,796,121,797,213,799,217,801,118],{},[48,798,212],{},[48,800,216],{},[48,802,220],{},[55,804,223,805,227,807,230],{},[172,806,226],{},[172,808,195],{},[55,810,121,811,192,813,239,815,242,817,246,819,250,821,118],{},[48,812,235],{},[172,814,238],{},[172,816,226],{},[48,818,245],{},[48,820,249],{},[48,822,253],{},[17,824,256],{},[17,826,827],{},[132,828],{"alt":205,"src":261},[13,830,831,873,877,881],{"title":264},[103,832,833,841,851,861,869],{},[55,834,121,835,272,837,276,839,230],{},[48,836,271],{},[172,838,275],{},[172,840,279],{},[55,842,121,843,192,845,239,847,242,849,118],{},[48,844,271],{},[172,846,286],{},[172,848,69],{},[48,850,291],{},[55,852,121,853,192,855,239,857,300,859,304],{},[48,854,212],{},[172,856,220],{},[172,858,69],{},[48,860,303],{},[55,862,121,863,192,865,313,867,230],{},[48,864,309],{},[172,866,312],{},[172,868,316],{},[55,870,319,871,118],{},[48,872,322],{},[17,874,875],{},[132,876],{"alt":327,"src":328},[17,878,331,879,118],{},[21,880,334],{"slug":28},[17,882,883],{},[132,884],{"alt":339,"src":340},[13,886,887,901,905,907],{"title":343},[103,888,889,897],{},[55,890,121,891,192,893,313,895,230],{},[48,892,309],{},[172,894,312],{},[172,896,354],{},[55,898,357,899,118],{},[48,900,360],{},[17,902,903],{},[132,904],{"alt":365,"src":366},[17,906,369],{},[17,908,909],{},[132,910],{"alt":374,"src":375},[13,912,913,919,923,961,965,967],{"title":378},[17,914,170,915,384,917,118],{},[48,916,383],{},[172,918,354],{},[17,920,921],{},[132,922],{"alt":391,"src":392},[103,924,925,935,949,957],{"start":395},[55,926,121,927,401,929,239,931,242,933,118],{},[48,928,400],{},[172,930,286],{},[172,932,406],{},[48,934,409],{},[55,936,121,937,192,939,239,941,300,943,420,945,250,947,118],{},[48,938,212],{},[172,940,220],{},[172,942,406],{},[48,944,303],{},[48,946,245],{},[48,948,425],{},[55,950,121,951,192,953,313,955,230],{},[48,952,309],{},[172,954,312],{},[172,956,434],{},[55,958,357,959,118],{},[48,960,439],{},[17,962,963],{},[132,964],{"alt":444,"src":445},[17,966,448],{},[17,968,969],{},[132,970],{"alt":453,"src":454},[13,972,973,975,999,1003,1005,1013],{"title":457},[98,974,461],{"id":460},[103,976,977,983,987,989,995],{},[55,978,170,979,469,981,118],{},[48,980,468],{},[48,982,472],{},[55,984,121,985,118],{},[48,986,477],{},[55,988,480],{},[55,990,121,991,486,993,490],{},[48,992,485],{},[48,994,489],{},[55,996,121,997,118],{},[48,998,472],{},[17,1000,1001],{},[132,1002],{"alt":499,"src":500},[98,1004,504],{"id":503},[103,1006,1007,1011],{},[55,1008,121,1009,118],{},[48,1010,472],{},[55,1012,513],{},[17,1014,516],{},[13,1016,1017,1019],{"title":519},[17,1018,522],{},[17,1020,1021,528,1023,469,1025,535],{},[48,1022,527],{},[48,1024,531],{},[48,1026,534],{},[13,1028,1029],{"title":538},[540,1030,1031,1041],{},[17,1032,1033,547,1035,551,1037,555,1039,558],{},[48,1034,546],{},[172,1036,550],{},[48,1038,554],{},[172,1040,195],{},[17,1042,1043],{},[562,1044,564],{},[13,1046,1047],{"title":567},[569,1048,1049,1057],{},[572,1050,1051],{},[575,1052,1053,1055],{},[578,1054,580],{},[578,1056,583],{},[585,1058,1059,1067,1073,1081,1097],{},[575,1060,1061,1063],{},[590,1062,592],{},[590,1064,595,1065,230],{},[172,1066,195],{},[575,1068,1069,1071],{},[590,1070,602],{},[590,1072,605],{},[575,1074,1075,1077],{},[590,1076,610],{},[590,1078,613,1079,616],{},[172,1080,312],{},[575,1082,1083,1085],{},[590,1084,621],{},[590,1086,624,1087,627,1089,631,1091,635,1093,250,1095,640],{},[172,1088,406],{},[172,1090,630],{},[172,1092,634],{},[48,1094,245],{},[48,1096,253],{},[575,1098,1099,1101],{},[590,1100,645],{},[590,1102,648],{},{"title":650,"searchDepth":395,"depth":395,"links":1104},[],[657,24,658,659],{},{"title":5,"description":650},{"id":4,"title":5,"body":1109,"description":650,"draft":652,"duration":653,"extension":654,"image":655,"kit":1542,"language":660,"level":661,"meta":1543,"navigation":663,"path":664,"pdf":665,"platform":666,"seo":1544,"stem":668,"youtube":669,"__hash__":670},{"type":7,"value":1110,"toc":1540},[1111],[10,1112,1113,1151,1155,1159,1202,1228,1266,1322,1348,1408,1452,1464,1482],{},[13,1114,1115,1125],{"title":15},[17,1116,19,1117,25,1119,30,1121,34,1123,39],{},[21,1118,24],{"slug":23},[21,1120,29],{"slug":28},[21,1122,33],{"slug":33},[21,1124,38],{"slug":37},[41,1126,1127,1131],{"color":43,"icon":44},[17,1128,1129],{},[48,1130,50],{},[52,1132,1133,1137,1139,1143,1147],{},[55,1134,57,1135],{},[21,1136,37],{"slug":37},[55,1138,62],{},[55,1140,65,1141,70],{},[21,1142,69],{"slug":68},[55,1144,65,1145,75],{},[21,1146,33],{"slug":33},[55,1148,78,1149],{},[21,1150,29],{"slug":28},[13,1152,1153],{"title":83},[85,1154],{},[13,1156,1157],{"title":89},[91,1158],{"terms":93},[13,1160,1161,1163,1178,1182,1184],{"title":96},[98,1162,101],{"id":100},[103,1164,1165,1167,1172],{},[55,1166,107],{},[55,1168,110,1169,118],{},[112,1170,117],{"href":114,"rel":1171},[116],[55,1173,121,1174,125,1176,118],{},[48,1175,124],{},[48,1177,128],{},[17,1179,1180],{},[132,1181],{"alt":134,"src":135},[98,1183,139],{"id":138},[103,1185,1186,1192,1196],{},[55,1187,144,1188,148,1190,118],{},[48,1189,147],{},[48,1191,24],{},[55,1193,121,1194,118],{},[48,1195,155],{},[55,1197,121,1198,160,1200,118],{},[48,1199,124],{},[48,1201,128],{},[13,1203,1204,1224],{"title":165},[103,1205,1206,1212,1218],{},[55,1207,170,1208,175,1210,179],{},[172,1209,174],{},[48,1211,178],{},[55,1213,170,1214,175,1216,179],{},[172,1215,184],{},[48,1217,178],{},[55,1219,121,1220,192,1222,196],{},[48,1221,191],{},[172,1223,195],{},[17,1225,1226],{},[132,1227],{"alt":201,"src":202},[13,1229,1230,1260,1262],{"title":205},[103,1231,1232,1240,1246],{},[55,1233,121,1234,213,1236,217,1238,118],{},[48,1235,212],{},[48,1237,216],{},[48,1239,220],{},[55,1241,223,1242,227,1244,230],{},[172,1243,226],{},[172,1245,195],{},[55,1247,121,1248,192,1250,239,1252,242,1254,246,1256,250,1258,118],{},[48,1249,235],{},[172,1251,238],{},[172,1253,226],{},[48,1255,245],{},[48,1257,249],{},[48,1259,253],{},[17,1261,256],{},[17,1263,1264],{},[132,1265],{"alt":205,"src":261},[13,1267,1268,1310,1314,1318],{"title":264},[103,1269,1270,1278,1288,1298,1306],{},[55,1271,121,1272,272,1274,276,1276,230],{},[48,1273,271],{},[172,1275,275],{},[172,1277,279],{},[55,1279,121,1280,192,1282,239,1284,242,1286,118],{},[48,1281,271],{},[172,1283,286],{},[172,1285,69],{},[48,1287,291],{},[55,1289,121,1290,192,1292,239,1294,300,1296,304],{},[48,1291,212],{},[172,1293,220],{},[172,1295,69],{},[48,1297,303],{},[55,1299,121,1300,192,1302,313,1304,230],{},[48,1301,309],{},[172,1303,312],{},[172,1305,316],{},[55,1307,319,1308,118],{},[48,1309,322],{},[17,1311,1312],{},[132,1313],{"alt":327,"src":328},[17,1315,331,1316,118],{},[21,1317,334],{"slug":28},[17,1319,1320],{},[132,1321],{"alt":339,"src":340},[13,1323,1324,1338,1342,1344],{"title":343},[103,1325,1326,1334],{},[55,1327,121,1328,192,1330,313,1332,230],{},[48,1329,309],{},[172,1331,312],{},[172,1333,354],{},[55,1335,357,1336,118],{},[48,1337,360],{},[17,1339,1340],{},[132,1341],{"alt":365,"src":366},[17,1343,369],{},[17,1345,1346],{},[132,1347],{"alt":374,"src":375},[13,1349,1350,1356,1360,1398,1402,1404],{"title":378},[17,1351,170,1352,384,1354,118],{},[48,1353,383],{},[172,1355,354],{},[17,1357,1358],{},[132,1359],{"alt":391,"src":392},[103,1361,1362,1372,1386,1394],{"start":395},[55,1363,121,1364,401,1366,239,1368,242,1370,118],{},[48,1365,400],{},[172,1367,286],{},[172,1369,406],{},[48,1371,409],{},[55,1373,121,1374,192,1376,239,1378,300,1380,420,1382,250,1384,118],{},[48,1375,212],{},[172,1377,220],{},[172,1379,406],{},[48,1381,303],{},[48,1383,245],{},[48,1385,425],{},[55,1387,121,1388,192,1390,313,1392,230],{},[48,1389,309],{},[172,1391,312],{},[172,1393,434],{},[55,1395,357,1396,118],{},[48,1397,439],{},[17,1399,1400],{},[132,1401],{"alt":444,"src":445},[17,1403,448],{},[17,1405,1406],{},[132,1407],{"alt":453,"src":454},[13,1409,1410,1412,1436,1440,1442,1450],{"title":457},[98,1411,461],{"id":460},[103,1413,1414,1420,1424,1426,1432],{},[55,1415,170,1416,469,1418,118],{},[48,1417,468],{},[48,1419,472],{},[55,1421,121,1422,118],{},[48,1423,477],{},[55,1425,480],{},[55,1427,121,1428,486,1430,490],{},[48,1429,485],{},[48,1431,489],{},[55,1433,121,1434,118],{},[48,1435,472],{},[17,1437,1438],{},[132,1439],{"alt":499,"src":500},[98,1441,504],{"id":503},[103,1443,1444,1448],{},[55,1445,121,1446,118],{},[48,1447,472],{},[55,1449,513],{},[17,1451,516],{},[13,1453,1454,1456],{"title":519},[17,1455,522],{},[17,1457,1458,528,1460,469,1462,535],{},[48,1459,527],{},[48,1461,531],{},[48,1463,534],{},[13,1465,1466],{"title":538},[540,1467,1468,1478],{},[17,1469,1470,547,1472,551,1474,555,1476,558],{},[48,1471,546],{},[172,1473,550],{},[48,1475,554],{},[172,1477,195],{},[17,1479,1480],{},[562,1481,564],{},[13,1483,1484],{"title":567},[569,1485,1486,1494],{},[572,1487,1488],{},[575,1489,1490,1492],{},[578,1491,580],{},[578,1493,583],{},[585,1495,1496,1504,1510,1518,1534],{},[575,1497,1498,1500],{},[590,1499,592],{},[590,1501,595,1502,230],{},[172,1503,195],{},[575,1505,1506,1508],{},[590,1507,602],{},[590,1509,605],{},[575,1511,1512,1514],{},[590,1513,610],{},[590,1515,613,1516,616],{},[172,1517,312],{},[575,1519,1520,1522],{},[590,1521,621],{},[590,1523,624,1524,627,1526,631,1528,635,1530,250,1532,640],{},[172,1525,406],{},[172,1527,630],{},[172,1529,634],{},[48,1531,245],{},[48,1533,253],{},[575,1535,1536,1538],{},[590,1537,645],{},[590,1539,648],{},{"title":650,"searchDepth":395,"depth":395,"links":1541},[],[657,24,658,659],{},{"title":5,"description":650},[1546,1559,1571,1583,1595,1608,1621,1633,1646,1658,1670,1683,1695,1706,1718,1729,1741,1753,1765,1777,1789,1801,1813,1825,1837,1849,1861,1873,1885,1897],{"id":1547,"category":1548,"definition":1549,"example":1550,"extension":654,"meta":1551,"stem":1556,"term":1557,"__hash__":1558},"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":1552},{"type":7,"value":1553,"toc":1554},[],{"title":650,"searchDepth":395,"depth":395,"links":1555},[],"glossary\u002Faccelerometer","Accelerometer","ksJj58OEPP72c3cASeHPlPiw73FfxxUbtIkoEIYW2Rc",{"id":1560,"category":1548,"definition":1561,"example":1562,"extension":654,"meta":1563,"stem":1568,"term":1569,"__hash__":1570},"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":1564},{"type":7,"value":1565,"toc":1566},[],{"title":650,"searchDepth":395,"depth":395,"links":1567},[],"glossary\u002Fbutton","Button","PgfcNSpG1mpSW_fVJZZMkF4D6eYiQLiyKWeq6_CXsMA",{"id":1572,"category":1548,"definition":1573,"example":1574,"extension":654,"meta":1575,"stem":1580,"term":1581,"__hash__":1582},"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":1576},{"type":7,"value":1577,"toc":1578},[],{"title":650,"searchDepth":395,"depth":395,"links":1579},[],"glossary\u002Fbuzzer","Buzzer","L0-h_InzgZ_gB0Iy3IE-ojdFF0cXjdB2AxJY0QU0VpU",{"id":1584,"category":271,"definition":1585,"example":1586,"extension":654,"meta":1587,"stem":1592,"term":1593,"__hash__":1594},"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":1588},{"type":7,"value":1589,"toc":1590},[],{"title":650,"searchDepth":395,"depth":395,"links":1591},[],"glossary\u002Fcomparison-operators","Comparison Operators","PPG3NDp3Xsx9FclsvC7ertn8IDeBVjhCknFTN17UIaU",{"id":1596,"category":1597,"definition":1598,"example":1599,"extension":654,"meta":1600,"stem":1605,"term":1606,"__hash__":1607},"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":1601},{"type":7,"value":1602,"toc":1603},[],{"title":650,"searchDepth":395,"depth":395,"links":1604},[],"glossary\u002Fforever-loop","Forever loop","1j2cYaiR3yKeoh54w9Vg2aWr_cEXEtj7F0WCR3_jdc0",{"id":1609,"category":1610,"definition":1611,"example":1612,"extension":654,"meta":1613,"stem":1618,"term":1619,"__hash__":1620},"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":1614},{"type":7,"value":1615,"toc":1616},[],{"title":650,"searchDepth":395,"depth":395,"links":1617},[],"glossary\u002Ffrequency","Frequency","XY4AeY0bsJaqF0XBjkEAvTSzqxdpPPLt09Z_LbZSjPg",{"id":1622,"category":1597,"definition":1623,"example":1624,"extension":654,"meta":1625,"stem":1630,"term":1631,"__hash__":1632},"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":1626},{"type":7,"value":1627,"toc":1628},[],{"title":650,"searchDepth":395,"depth":395,"links":1629},[],"glossary\u002Ffunction","Function","0aEVvGRMWsAC1qXngj6QCHxCoIn1mWfHYBBi95ayuLE",{"id":1634,"category":1635,"definition":1636,"example":1637,"extension":654,"meta":1638,"stem":1643,"term":1644,"__hash__":1645},"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":1639},{"type":7,"value":1640,"toc":1641},[],{"title":650,"searchDepth":395,"depth":395,"links":1642},[],"glossary\u002Fide-code-editor","IDE (code editor)","yc7Eds8WdmrIM56FGlCmMtjhoodKwT1IUvQCC9bsvKs",{"id":1647,"category":271,"definition":1648,"example":1649,"extension":654,"meta":1650,"stem":1655,"term":1656,"__hash__":1657},"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":1651},{"type":7,"value":1652,"toc":1653},[],{"title":650,"searchDepth":395,"depth":395,"links":1654},[],"glossary\u002Fif-statement","If statement","3uYmpX5sGUnkc327qCP_EkL6IGkFiginfOP39Kstry8",{"id":1659,"category":1597,"definition":1660,"example":1661,"extension":654,"meta":1662,"stem":1667,"term":1668,"__hash__":1669},"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":1663},{"type":7,"value":1664,"toc":1665},[],{"title":650,"searchDepth":395,"depth":395,"links":1666},[],"glossary\u002Fimporting-libraries","Importing Libraries","Wqj3o2kxbFQa44LtzhYfeDYluwIPxxWChkL00OD1LqI",{"id":1671,"category":1672,"definition":1673,"example":1674,"extension":654,"meta":1675,"stem":1680,"term":1681,"__hash__":1682},"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":1676},{"type":7,"value":1677,"toc":1678},[],{"title":650,"searchDepth":395,"depth":395,"links":1679},[],"glossary\u002Finteger","Integer","lktbVeg3VEBLF2Jg3R_EKdjEowVZeabE1gPnGpI2OXY",{"id":1684,"category":1548,"definition":1685,"example":1686,"extension":654,"meta":1687,"stem":1692,"term":1693,"__hash__":1694},"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":1688},{"type":7,"value":1689,"toc":1690},[],{"title":650,"searchDepth":395,"depth":395,"links":1691},[],"glossary\u002Fled","LED","M41j-xq46HhMvOjtpYSjfy0ypnoMYVzgeqVGSuyVciY",{"id":1696,"category":1548,"definition":1697,"example":1698,"extension":654,"meta":1699,"stem":1704,"term":334,"__hash__":1705},"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":1700},{"type":7,"value":1701,"toc":1702},[],{"title":650,"searchDepth":395,"depth":395,"links":1703},[],"glossary\u002Fled-matrix","KfPJAm7v5EXlm2ejZZLldfB4w7zOMZQhbrmsqxpqJi8",{"id":1707,"category":1548,"definition":1708,"example":1709,"extension":654,"meta":1710,"stem":1715,"term":1716,"__hash__":1717},"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":1711},{"type":7,"value":1712,"toc":1713},[],{"title":650,"searchDepth":395,"depth":395,"links":1714},[],"glossary\u002Flight-sensor","Light Sensor","tEERMTJO24JmYYlQoIO7DxY9yXg0GNehs78E_LQL28U",{"id":1719,"category":1548,"definition":1720,"example":1721,"extension":654,"meta":1722,"stem":1727,"term":24,"__hash__":1728},"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":1723},{"type":7,"value":1724,"toc":1725},[],{"title":650,"searchDepth":395,"depth":395,"links":1726},[],"glossary\u002Fmicro-bit","GZPIPrw-9_LkW4seKGxZt6hAdg8MO_A_wOS-mN4qDTg",{"id":1730,"category":1635,"definition":1731,"example":1732,"extension":654,"meta":1733,"stem":1738,"term":1739,"__hash__":1740},"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":1734},{"type":7,"value":1735,"toc":1736},[],{"title":650,"searchDepth":395,"depth":395,"links":1737},[],"glossary\u002Fmillisecond","Millisecond","2TwuImc8S9MyMSqRFO3i6iHVCdsxyJ_S9N_BxGbZL-8",{"id":1742,"category":1548,"definition":1743,"example":1744,"extension":654,"meta":1745,"stem":1750,"term":1751,"__hash__":1752},"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":1746},{"type":7,"value":1747,"toc":1748},[],{"title":650,"searchDepth":395,"depth":395,"links":1749},[],"glossary\u002Fmodule","Module","IDLrS2CrlwNauzAWoCd7V16aO_ygDWyjp11bMsfuwO0",{"id":1754,"category":1548,"definition":1755,"example":1756,"extension":654,"meta":1757,"stem":1762,"term":1763,"__hash__":1764},"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":1758},{"type":7,"value":1759,"toc":1760},[],{"title":650,"searchDepth":395,"depth":395,"links":1761},[],"glossary\u002Fmotor-controller","Motor controller","McSSBLd3fPtYq-o2LUQBhW3pBeEmMSjF6cnb2O9ectE",{"id":1766,"category":1548,"definition":1767,"example":1768,"extension":654,"meta":1769,"stem":1774,"term":1775,"__hash__":1776},"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":1770},{"type":7,"value":1771,"toc":1772},[],{"title":650,"searchDepth":395,"depth":395,"links":1773},[],"glossary\u002Foled-screen","OLED screen","14SaCtmWj71MOziFuPIW377cynK4FRv5TsdEx4fGGFk",{"id":1778,"category":1548,"definition":1779,"example":1780,"extension":654,"meta":1781,"stem":1786,"term":1787,"__hash__":1788},"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":1782},{"type":7,"value":1783,"toc":1784},[],{"title":650,"searchDepth":395,"depth":395,"links":1785},[],"glossary\u002Fpicobricks","PicoBricks","TeGs24I-3fkAdlpiuQPPBDUO8EKBe8PS1ewHaj-w5_s",{"id":1790,"category":1548,"definition":1791,"example":1792,"extension":654,"meta":1793,"stem":1798,"term":1799,"__hash__":1800},"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":1794},{"type":7,"value":1795,"toc":1796},[],{"title":650,"searchDepth":395,"depth":395,"links":1797},[],"glossary\u002Fpotentiometer","Potentiometer","ohP2krcKZLkMtpI44R32nhDVwImLmSBQWP6SOArsh6M",{"id":1802,"category":1597,"definition":1803,"example":1804,"extension":654,"meta":1805,"stem":1810,"term":1811,"__hash__":1812},"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":1806},{"type":7,"value":1807,"toc":1808},[],{"title":650,"searchDepth":395,"depth":395,"links":1809},[],"glossary\u002Frandom","Random","LkGfQKwUNfJ_TPXihwPveX2JeJ9-BB7DpUire9a2pqI",{"id":1814,"category":1548,"definition":1815,"example":1816,"extension":654,"meta":1817,"stem":1822,"term":1823,"__hash__":1824},"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":1818},{"type":7,"value":1819,"toc":1820},[],{"title":650,"searchDepth":395,"depth":395,"links":1821},[],"glossary\u002Fraspberry-pi-pico","Raspberry Pi Pico","HVa7r-PC6I5-DVcDdOULsBHP6h7V4SafhFtdazcSWYg",{"id":1826,"category":1597,"definition":1827,"example":1828,"extension":654,"meta":1829,"stem":1834,"term":1835,"__hash__":1836},"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":1830},{"type":7,"value":1831,"toc":1832},[],{"title":650,"searchDepth":395,"depth":395,"links":1833},[],"glossary\u002Frepeat-loop","Repeat loop","YC2iTUQ841lfmltd6Pkq89uuQbk29RWgR-rWs7MvjJ4",{"id":1838,"category":1548,"definition":1839,"example":1840,"extension":654,"meta":1841,"stem":1846,"term":1847,"__hash__":1848},"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":1842},{"type":7,"value":1843,"toc":1844},[],{"title":650,"searchDepth":395,"depth":395,"links":1845},[],"glossary\u002Frgb-led","RGB LED","mIu-76nYeQtI-NsTMcvPueLH11JE0fC5X2jJxBmKwPU",{"id":1850,"category":1548,"definition":1851,"example":1852,"extension":654,"meta":1853,"stem":1858,"term":1859,"__hash__":1860},"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":1854},{"type":7,"value":1855,"toc":1856},[],{"title":650,"searchDepth":395,"depth":395,"links":1857},[],"glossary\u002Fservo-motor","Servo motor","IFtMLIEoNZ746ebquvkvp-PAqDQObQACMiWUTb3rfZ8",{"id":1862,"category":1548,"definition":1863,"example":1864,"extension":654,"meta":1865,"stem":1870,"term":1871,"__hash__":1872},"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":1866},{"type":7,"value":1867,"toc":1868},[],{"title":650,"searchDepth":395,"depth":395,"links":1869},[],"glossary\u002Ftemperature-sensor","Temperature sensor","UbSScS-TCPLSFDjnxsaFltpoKbORTAOaxh68b_-FMw8",{"id":1874,"category":271,"definition":1875,"example":1876,"extension":654,"meta":1877,"stem":1882,"term":1883,"__hash__":1884},"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":1878},{"type":7,"value":1879,"toc":1880},[],{"title":650,"searchDepth":395,"depth":395,"links":1881},[],"glossary\u002Fthreshold","Threshold","xikcgh-PcWY0Z_HhDY16B8SLJLbL0oJD8WUU3KpHqvY",{"id":1886,"category":1672,"definition":1887,"example":1888,"extension":654,"meta":1889,"stem":1894,"term":1895,"__hash__":1896},"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":1890},{"type":7,"value":1891,"toc":1892},[],{"title":650,"searchDepth":395,"depth":395,"links":1893},[],"glossary\u002Fvariable","Variable","nlzJUTSGqyIAKSbopFF01oPBuJT59zOT7MSoCpOMp1E",{"id":1898,"category":1597,"definition":1899,"example":1900,"extension":654,"meta":1901,"stem":1906,"term":1907,"__hash__":1908},"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":1902},{"type":7,"value":1903,"toc":1904},[],{"title":650,"searchDepth":395,"depth":395,"links":1905},[],"glossary\u002Fwhile-loop","While loop","igK-e_snGhkP0kgSn6sPO7YQybQ0WpDfQMB0_8I2iZg",[1910,1916,1922,1928,1934,1940,1946,1952,1958,1964,1970,1976,1982,1988,1994,2000,2006,2012,2018,2024,2030,2036,2042,2048,2054,2060,2066,2072,2078,2084],{"id":1547,"category":1548,"definition":1549,"example":1550,"extension":654,"meta":1911,"stem":1556,"term":1557,"__hash__":1558},{"body":1912},{"type":7,"value":1913,"toc":1914},[],{"title":650,"searchDepth":395,"depth":395,"links":1915},[],{"id":1560,"category":1548,"definition":1561,"example":1562,"extension":654,"meta":1917,"stem":1568,"term":1569,"__hash__":1570},{"body":1918},{"type":7,"value":1919,"toc":1920},[],{"title":650,"searchDepth":395,"depth":395,"links":1921},[],{"id":1572,"category":1548,"definition":1573,"example":1574,"extension":654,"meta":1923,"stem":1580,"term":1581,"__hash__":1582},{"body":1924},{"type":7,"value":1925,"toc":1926},[],{"title":650,"searchDepth":395,"depth":395,"links":1927},[],{"id":1584,"category":271,"definition":1585,"example":1586,"extension":654,"meta":1929,"stem":1592,"term":1593,"__hash__":1594},{"body":1930},{"type":7,"value":1931,"toc":1932},[],{"title":650,"searchDepth":395,"depth":395,"links":1933},[],{"id":1596,"category":1597,"definition":1598,"example":1599,"extension":654,"meta":1935,"stem":1605,"term":1606,"__hash__":1607},{"body":1936},{"type":7,"value":1937,"toc":1938},[],{"title":650,"searchDepth":395,"depth":395,"links":1939},[],{"id":1609,"category":1610,"definition":1611,"example":1612,"extension":654,"meta":1941,"stem":1618,"term":1619,"__hash__":1620},{"body":1942},{"type":7,"value":1943,"toc":1944},[],{"title":650,"searchDepth":395,"depth":395,"links":1945},[],{"id":1622,"category":1597,"definition":1623,"example":1624,"extension":654,"meta":1947,"stem":1630,"term":1631,"__hash__":1632},{"body":1948},{"type":7,"value":1949,"toc":1950},[],{"title":650,"searchDepth":395,"depth":395,"links":1951},[],{"id":1634,"category":1635,"definition":1636,"example":1637,"extension":654,"meta":1953,"stem":1643,"term":1644,"__hash__":1645},{"body":1954},{"type":7,"value":1955,"toc":1956},[],{"title":650,"searchDepth":395,"depth":395,"links":1957},[],{"id":1647,"category":271,"definition":1648,"example":1649,"extension":654,"meta":1959,"stem":1655,"term":1656,"__hash__":1657},{"body":1960},{"type":7,"value":1961,"toc":1962},[],{"title":650,"searchDepth":395,"depth":395,"links":1963},[],{"id":1659,"category":1597,"definition":1660,"example":1661,"extension":654,"meta":1965,"stem":1667,"term":1668,"__hash__":1669},{"body":1966},{"type":7,"value":1967,"toc":1968},[],{"title":650,"searchDepth":395,"depth":395,"links":1969},[],{"id":1671,"category":1672,"definition":1673,"example":1674,"extension":654,"meta":1971,"stem":1680,"term":1681,"__hash__":1682},{"body":1972},{"type":7,"value":1973,"toc":1974},[],{"title":650,"searchDepth":395,"depth":395,"links":1975},[],{"id":1684,"category":1548,"definition":1685,"example":1686,"extension":654,"meta":1977,"stem":1692,"term":1693,"__hash__":1694},{"body":1978},{"type":7,"value":1979,"toc":1980},[],{"title":650,"searchDepth":395,"depth":395,"links":1981},[],{"id":1696,"category":1548,"definition":1697,"example":1698,"extension":654,"meta":1983,"stem":1704,"term":334,"__hash__":1705},{"body":1984},{"type":7,"value":1985,"toc":1986},[],{"title":650,"searchDepth":395,"depth":395,"links":1987},[],{"id":1707,"category":1548,"definition":1708,"example":1709,"extension":654,"meta":1989,"stem":1715,"term":1716,"__hash__":1717},{"body":1990},{"type":7,"value":1991,"toc":1992},[],{"title":650,"searchDepth":395,"depth":395,"links":1993},[],{"id":1730,"category":1635,"definition":1731,"example":1732,"extension":654,"meta":1995,"stem":1738,"term":1739,"__hash__":1740},{"body":1996},{"type":7,"value":1997,"toc":1998},[],{"title":650,"searchDepth":395,"depth":395,"links":1999},[],{"id":1742,"category":1548,"definition":1743,"example":1744,"extension":654,"meta":2001,"stem":1750,"term":1751,"__hash__":1752},{"body":2002},{"type":7,"value":2003,"toc":2004},[],{"title":650,"searchDepth":395,"depth":395,"links":2005},[],{"id":1754,"category":1548,"definition":1755,"example":1756,"extension":654,"meta":2007,"stem":1762,"term":1763,"__hash__":1764},{"body":2008},{"type":7,"value":2009,"toc":2010},[],{"title":650,"searchDepth":395,"depth":395,"links":2011},[],{"id":1766,"category":1548,"definition":1767,"example":1768,"extension":654,"meta":2013,"stem":1774,"term":1775,"__hash__":1776},{"body":2014},{"type":7,"value":2015,"toc":2016},[],{"title":650,"searchDepth":395,"depth":395,"links":2017},[],{"id":1778,"category":1548,"definition":1779,"example":1780,"extension":654,"meta":2019,"stem":1786,"term":1787,"__hash__":1788},{"body":2020},{"type":7,"value":2021,"toc":2022},[],{"title":650,"searchDepth":395,"depth":395,"links":2023},[],{"id":1790,"category":1548,"definition":1791,"example":1792,"extension":654,"meta":2025,"stem":1798,"term":1799,"__hash__":1800},{"body":2026},{"type":7,"value":2027,"toc":2028},[],{"title":650,"searchDepth":395,"depth":395,"links":2029},[],{"id":1838,"category":1548,"definition":1839,"example":1840,"extension":654,"meta":2031,"stem":1846,"term":1847,"__hash__":1848},{"body":2032},{"type":7,"value":2033,"toc":2034},[],{"title":650,"searchDepth":395,"depth":395,"links":2035},[],{"id":1802,"category":1597,"definition":1803,"example":1804,"extension":654,"meta":2037,"stem":1810,"term":1811,"__hash__":1812},{"body":2038},{"type":7,"value":2039,"toc":2040},[],{"title":650,"searchDepth":395,"depth":395,"links":2041},[],{"id":1814,"category":1548,"definition":1815,"example":1816,"extension":654,"meta":2043,"stem":1822,"term":1823,"__hash__":1824},{"body":2044},{"type":7,"value":2045,"toc":2046},[],{"title":650,"searchDepth":395,"depth":395,"links":2047},[],{"id":1826,"category":1597,"definition":1827,"example":1828,"extension":654,"meta":2049,"stem":1834,"term":1835,"__hash__":1836},{"body":2050},{"type":7,"value":2051,"toc":2052},[],{"title":650,"searchDepth":395,"depth":395,"links":2053},[],{"id":1850,"category":1548,"definition":1851,"example":1852,"extension":654,"meta":2055,"stem":1858,"term":1859,"__hash__":1860},{"body":2056},{"type":7,"value":2057,"toc":2058},[],{"title":650,"searchDepth":395,"depth":395,"links":2059},[],{"id":1862,"category":1548,"definition":1863,"example":1864,"extension":654,"meta":2061,"stem":1870,"term":1871,"__hash__":1872},{"body":2062},{"type":7,"value":2063,"toc":2064},[],{"title":650,"searchDepth":395,"depth":395,"links":2065},[],{"id":1874,"category":271,"definition":1875,"example":1876,"extension":654,"meta":2067,"stem":1882,"term":1883,"__hash__":1884},{"body":2068},{"type":7,"value":2069,"toc":2070},[],{"title":650,"searchDepth":395,"depth":395,"links":2071},[],{"id":1886,"category":1672,"definition":1887,"example":1888,"extension":654,"meta":2073,"stem":1894,"term":1895,"__hash__":1896},{"body":2074},{"type":7,"value":2075,"toc":2076},[],{"title":650,"searchDepth":395,"depth":395,"links":2077},[],{"id":1898,"category":1597,"definition":1899,"example":1900,"extension":654,"meta":2079,"stem":1906,"term":1907,"__hash__":1908},{"body":2080},{"type":7,"value":2081,"toc":2082},[],{"title":650,"searchDepth":395,"depth":395,"links":2083},[],{"id":1719,"category":1548,"definition":1720,"example":1721,"extension":654,"meta":2085,"stem":1727,"term":24,"__hash__":1728},{"body":2086},{"type":7,"value":2087,"toc":2088},[],{"title":650,"searchDepth":395,"depth":395,"links":2089},[],1788101567839]