[{"data":1,"prerenderedAt":2826},["ShallowReactive",2],{"tutorial:\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm":3,"tutorial-steps:\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm":930,"kit-\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm":1605,"key-words-glossary":2280,"glossary":2645},{"id":4,"title":5,"body":6,"description":908,"draft":911,"duration":912,"extension":913,"image":914,"kit":915,"language":920,"level":921,"meta":922,"navigation":923,"path":924,"pdf":925,"platform":926,"seo":927,"stem":928,"youtube":908,"__hash__":929},"tutorials\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm\u002Findex.md","Dominate the Rhythm",{"type":7,"value":8,"toc":907},"minimark",[9],[10,11,12,70,76,83,117,183,465,816,837,849],"tutorial-steps",{},[13,14,16,20,36,43],"step",{"title":15},"Overview",[17,18,19],"p",{},"Let's turn PicoBricks into a mini music player! 🎵",[17,21,22,23,27,28,31,32,35],{},"In this project you'll code the ",[24,25,26],"g",{"slug":26},"buzzer"," to play a tune, use the ",[24,29,30],{"slug":30},"potentiometer"," to change how fast the music plays, and press a ",[24,33,34],{"slug":34},"button"," to start the song.",[17,37,38,39,42],{},"Music is made of notes. Each note has its own special number called a ",[24,40,41],{"slug":41},"frequency",". If we tell the buzzer the right numbers, in the right order, it can play any song we like!",[44,45,48,54],"callout",{"color":46,"icon":47},"green","🎯",[17,49,50],{},[51,52,53],"strong",{},"What you'll learn",[55,56,57,61,64,67],"ul",{},[58,59,60],"li",{},"How to make a buzzer play musical notes",[58,62,63],{},"How to use a potentiometer (dial) to control speed",[58,65,66],{},"How to use a button to start your music",[58,68,69],{},"How to create and use variables",[13,71,73],{"title":72},"What you'll need",[74,75],"what-youll-need",{},[13,77,79],{"title":78},"Key words",[80,81],"key-words",{"terms":82},"potentiometer,variable,frequency,buzzer,button,oled-screen,picobricks,module,function,repeat-loop,forever-loop,if-statement",[13,84,86,110],{"title":85},"Set up your PicoBricks",[87,88,89,100,103],"ol",{},[58,90,91,92,99],{},"Open your favourite web browser. We recommend either Google Chrome or Microsoft Edge. Type ",[93,94,98],"a",{"href":95,"rel":96},"http:\u002F\u002Fide.picobricks.com",[97],"nofollow","ide.picobricks.com"," into the address bar.",[58,101,102],{},"Connect the PicoBricks board to your computer using the USB cable.",[58,104,105,106,109],{},"Connect the PicoBricks board to the Brick IDE by selecting the ",[51,107,108],{},"Connection"," button at the top of the code area.",[17,111,112],{},[113,114],"img",{"alt":115,"src":116},"The PicoBricks Brick IDE coding environment","\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm\u002FCodingEnvironment.webp",[13,118,120,137,168],{"title":119},"Create your variables",[17,121,122,123,127,128,132,133,136],{},"We need two ",[24,124,126],{"slug":125},"variable","variables",". One called ",[129,130,131],"code",{},"beat"," and one called ",[129,134,135],{},"rhythm",".",[87,138,139,145,150,160],{},[58,140,141,142,136],{},"Select ",[51,143,144],{},"Variables",[58,146,141,147,136],{},[51,148,149],{},"Create a Variable",[58,151,152,153,155,156,159],{},"Type ",[129,154,131],{}," and press ",[51,157,158],{},"Enter"," on your keyboard.",[58,161,162,163,165,166,136],{},"Do exactly the same again to make the ",[129,164,135],{}," variable, but this time type ",[129,167,135],{},[44,169,172,178],{"color":170,"icon":171},"blue","💡",[17,173,174,175,177],{},"The ",[129,176,131],{}," variable will control how long each note lasts.",[17,179,174,180,182],{},[129,181,135],{}," variable will store the speed we read from the potentiometer.",[13,184,186,193,294,301,304,370,373,459],{"title":185},"Make the music function",[17,187,188,189,192],{},"A ",[24,190,191],{"slug":191},"function"," is a chunk of code you can use again and again. This one plays our tune.",[87,194,195,205,214,227,237,249,264,277,286],{},[58,196,141,197,200,201,204],{},[51,198,199],{},"Functions",". Select and drag a ",[129,202,203],{},"to do something"," block to the code area and drop it.",[58,206,141,207,210,211,136],{},[129,208,209],{},"do something"," and type ",[51,212,213],{},"music",[58,215,141,216,219,220,223,224,226],{},[51,217,218],{},"Bricks"," and select and drag a ",[129,221,222],{},"Play Buzzer Freq"," block to the code area. Attach it within the ",[129,225,213],{}," block.",[58,228,229,230,233,234,136],{},"Change ",[51,231,232],{},"300"," to ",[51,235,236],{},"880",[58,238,141,239,200,242,245,246,226],{},[51,240,241],{},"Loops",[129,243,244],{},"wait"," block to the code area and attach it under the ",[129,247,248],{},"Play Buzzer Freq 880",[58,250,141,251,200,254,257,258,260,261,136],{},[51,252,253],{},"Math",[129,255,256],{},"1 + 1"," block to the code area and attach it within the ",[129,259,244],{}," block where it says ",[51,262,263],{},"1",[58,265,141,266,268,269,271,272,274,275,226],{},[51,267,144],{},". Select the ",[129,270,131],{}," variable and drag it to the code area, attaching it within the first ",[51,273,263],{}," of the ",[129,276,244],{},[58,278,279,280,233,283,136],{},"Change the ",[51,281,282],{},"+",[51,284,285],{},"x",[58,287,288,289,233,291,136],{},"Change the remaining ",[51,290,263],{},[51,292,293],{},"2",[44,295,298],{"color":296,"icon":297},"purple","🎵",[17,299,300],{},"This makes the first note last for two beats.",[17,302,303],{},"Now add the repeating part of the tune.",[87,305,306,317,325,333,341,350,357],{},[58,307,141,308,200,310,313,314,226],{},[51,309,241],{},[129,311,312],{},"repeat"," block to the code area and attach it below the ",[129,315,316],{},"wait for 2",[58,318,229,319,233,322,136],{},[51,320,321],{},"10",[51,323,324],{},"6",[58,326,141,327,200,329,257,331,226],{},[51,328,241],{},[129,330,244],{},[129,332,312],{},[58,334,141,335,200,337,257,339,226],{},[51,336,144],{},[129,338,131],{},[129,340,244],{},[58,342,141,343,200,345,313,347,226],{},[51,344,218],{},[129,346,222],{},[129,348,349],{},"wait beat",[58,351,229,352,233,354,136],{},[51,353,232],{},[51,355,356],{},"659",[58,358,359,360,362,363,366,367,226],{},"Duplicate the ",[129,361,244],{}," block by right-clicking and selecting ",[51,364,365],{},"Duplicate",". Attach the duplicated block under the ",[129,368,369],{},"Play Buzzer Freq 659",[17,371,372],{},"Next, build the rest of the tune.",[87,374,375,387,395,401,407,419,426,432,438,444,450],{},[58,376,377,378,380,381,383,384,136],{},"Duplicate a ",[129,379,222],{}," block and attach it under the ",[129,382,312],{}," block. Change the number to ",[51,385,386],{},"698",[58,388,377,389,391,392,226],{},[129,390,244],{}," block and attach it below the ",[129,393,394],{},"Play Buzzer Freq 698",[58,396,377,397,380,399,226],{},[129,398,369],{},[129,400,244],{},[58,402,377,403,380,405,226],{},[129,404,244],{},[129,406,369],{},[58,408,377,409,380,411,413,414,233,416,136],{},[129,410,369],{},[129,412,244],{}," block. Change ",[51,415,356],{},[51,417,418],{},"587",[58,420,377,421,380,423,226],{},[129,422,244],{},[129,424,425],{},"Play Buzzer Freq 587",[58,427,377,428,391,430,226],{},[129,429,394],{},[129,431,349],{},[58,433,377,434,380,436,226],{},[129,435,349],{},[129,437,394],{},[58,439,377,440,380,442,226],{},[129,441,369],{},[129,443,349],{},[58,445,377,446,391,448,226],{},[129,447,349],{},[129,449,369],{},[58,451,141,452,200,454,245,457,226],{},[51,453,218],{},[129,455,456],{},"Stop Buzzer Interval",[129,458,349],{},[17,460,461],{},[113,462],{"alt":463,"src":464},"The finished music function blocks","\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm\u002FMusicFunction.webp",[13,466,468,471,485,582,585,659,662,755,758,810],{"title":467},"Build the start-up code",[17,469,470],{},"This code runs as soon as you switch on. It reads the dial, shows the speed on the screen, and waits for you to press the button.",[44,472,474,479,482],{"color":170,"icon":473},"🧠",[17,475,476],{},[51,477,478],{},"Tricky maths alert!",[17,480,481],{},"This part uses some clever maths to turn the dial into a speed. Don't worry if it feels hard, even grown-ups find this bit tricky!",[17,483,484],{},"Just follow each step carefully and copy the blocks exactly. The code reads the dial and works out how fast to play your tune.",[87,486,487,495,505,514,524,540,556,568],{},[58,488,141,489,200,492,204],{},[51,490,491],{},"Basic",[129,493,494],{},"PicoBricks",[58,496,141,497,200,499,313,503,226],{},[51,498,241],{},[24,500,502],{"slug":501},"forever-loop","forever",[129,504,494],{},[58,506,141,507,200,509,257,512,226],{},[51,508,144],{},[129,510,511],{},"set rhythm",[129,513,502],{},[58,515,141,516,200,518,257,521,226],{},[51,517,253],{},[129,519,520],{},"round",[129,522,523],{},"set rhythm to",[58,525,141,526,200,528,257,530,274,533,535,536,233,538,136],{},[51,527,253],{},[129,529,256],{},[51,531,532],{},"3.1",[129,534,520],{}," block. Change the ",[51,537,282],{},[51,539,285],{},[58,541,141,542,200,544,546,547,274,549,535,551,233,553,136],{},[51,543,253],{},[129,545,256],{}," block to the code area and attach it within the second ",[51,548,263],{},[129,550,520],{},[51,552,282],{},[51,554,555],{},"÷",[58,557,141,558,200,560,563,564,274,566,226],{},[51,559,218],{},[129,561,562],{},"Read Potentiometer"," block to the code area and attach it within the first ",[51,565,263],{},[129,567,520],{},[58,569,570,571,233,573,576,577,233,579,136],{},"Change the next ",[51,572,263],{},[51,574,575],{},"7"," and the remaining ",[51,578,263],{},[51,580,581],{},"65535",[17,583,584],{},"Now show the speed on the screen.",[87,586,587,598,607,627,635,642,649],{},[58,588,141,589,200,592,595,596,226],{},[51,590,591],{},"Display",[129,593,594],{},"Clear Screen Buffer"," block to the code area and attach it above the ",[129,597,523],{},[58,599,141,600,200,602,245,605,226],{},[51,601,591],{},[129,603,604],{},"Write Text to Screen",[129,606,523],{},[58,608,279,609,612,613,616,617,612,620,623,624,136],{},[51,610,611],{},"X"," value to ",[51,614,615],{},"15",", the ",[51,618,619],{},"Y",[51,621,622],{},"30",", and the text to ",[51,625,626],{},"Speed",[58,628,359,629,380,632,226],{},[129,630,631],{},"Write Text To Screen",[129,633,634],{},"Write Text To Screen X 15 Y 30 \"Speed\"",[58,636,279,637,612,639,136],{},[51,638,611],{},[51,640,641],{},"70",[58,643,141,644,200,646,648],{},[51,645,144],{},[129,647,135],{}," block to the code area and attach it in place of the text.",[58,650,141,651,200,653,245,656,226],{},[51,652,591],{},[129,654,655],{},"Show Screen Buffer",[129,657,658],{},"Write Text To Screen X 70 Y 30 rhythm",[17,660,661],{},"Next, set the beat.",[87,663,664,677,687,694,703,712,721,728,737,745],{},[58,665,141,666,669,670,674,675,226],{},[51,667,668],{},"Logic",". Select and drag an ",[24,671,673],{"slug":672},"if-statement","if"," block to the code area, attaching it under the ",[129,676,655],{},[58,678,141,679,669,681,684,685,226],{},[51,680,668],{},[129,682,683],{},"="," block to the code area and attach it within the blank space of the ",[129,686,673],{},[58,688,279,689,233,691,136],{},[51,690,683],{},[51,692,693],{},"≠",[58,695,141,696,200,698,700,701,226],{},[51,697,144],{},[129,699,135],{}," block to the code area and attach it within the first blank of the ",[129,702,673],{},[58,704,141,705,200,707,684,710,226],{},[51,706,253],{},[129,708,709],{},"0",[129,711,673],{},[58,713,141,714,200,716,257,718,226],{},[51,715,144],{},[129,717,511],{},[129,719,720],{},"if rhythm ≠ 0 do",[58,722,229,723,233,725,727],{},[51,724,135],{},[51,726,131],{}," by selecting the little arrow on the block.",[58,729,141,730,200,732,257,734,226],{},[51,731,253],{},[129,733,256],{},[129,735,736],{},"set beat to",[58,738,279,739,741,742,744],{},[51,740,282],{}," to a ",[51,743,555],{}," sign.",[58,746,141,747,200,749,546,751,274,753,226],{},[51,748,144],{},[129,750,135],{},[51,752,263],{},[129,754,736],{},[17,756,757],{},"Now add the button press.",[87,759,760,768,776,786,795,801],{},[58,761,141,762,669,764,245,766,226],{},[51,763,668],{},[129,765,673],{},[129,767,720],{},[58,769,141,770,669,772,684,774,226],{},[51,771,668],{},[129,773,683],{},[129,775,673],{},[58,777,141,778,200,780,783,784,226],{},[51,779,218],{},[129,781,782],{},"Read Button"," block to the code area and attach it within the first blank space of the ",[129,785,673],{},[58,787,141,788,200,790,792,793,226],{},[51,789,253],{},[129,791,709],{}," block to the code area and attach it in the blank space of the ",[129,794,673],{},[58,796,279,797,233,799,136],{},[51,798,709],{},[51,800,263],{},[58,802,141,803,200,805,257,807,226],{},[51,804,199],{},[129,806,213],{},[129,808,809],{},"if Read Button = 1 do",[17,811,812],{},[113,813],{"alt":814,"src":815},"The finished start-up code blocks","\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm\u002FStartUpCode.webp",[13,817,819,822,828,831],{"title":818},"Run it and listen",[17,820,821],{},"Now the code is finished, let's run it and check it works.",[17,823,824,825,109],{},"Select the ",[51,826,827],{},"Run",[17,829,830],{},"Turn the potentiometer to change the speed of the music. You'll see the speed appear on the LED display. When you're ready, press the button to play your tune! 🎶",[44,832,834],{"color":46,"icon":833},"🎶",[17,835,836],{},"You have made your own PicoBricks music player. Brilliant work!",[13,838,840],{"title":839},"Try it yourself",[841,842,843],"try-it",{},[17,844,845,848],{},[51,846,847],{},"Challenge:"," Try changing the frequency numbers in your music function to make up your very own tune. What happens if you use bigger numbers? What about smaller ones?",[13,850,852],{"title":851},"Stuck? Quick fixes",[853,854,855,868],"table",{},[856,857,858],"thead",{},[859,860,861,865],"tr",{},[862,863,864],"th",{},"Problem",[862,866,867],{},"Try this",[869,870,871,880,888,899],"tbody",{},[859,872,873,877],{},[874,875,876],"td",{},"You can't hear any music",[874,878,879],{},"Check the buzzer module is connected properly with its cable.",[859,881,882,885],{},[874,883,884],{},"The speed doesn't change when you turn the dial",[874,886,887],{},"Check the potentiometer module is plugged in with its cable.",[859,889,890,893],{},[874,891,892],{},"Nothing happens when you press the button",[874,894,895,896,226],{},"Make sure the button module is connected, and check your ",[129,897,898],{},"if Read Button = 1",[859,900,901,904],{},[874,902,903],{},"Your code won't run",[874,905,906],{},"Check the PicoBricks board is plugged into your computer with the USB cable.",{"title":908,"searchDepth":909,"depth":909,"links":910},"",2,[],false,"30 mins","md","\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm\u002Fcover-dominate-the-rhythm.png",[916,917,918,919],"PicoBricks Kit","PicoBricks Brick IDE","MicroUSB to USB cable","Laptop or tablet for coding",null,"Beginner",{},true,"\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm","\u002Flearn\u002Fpicobricks\u002Fdominate-the-rhythm\u002Fdominate-the-rhythm.pdf","picobricks",{"title":5,"description":908},"learn\u002Fpicobricks\u002Fdominate-the-rhythm\u002Findex","OmSW97Padp9YRCs284DAls8-PrtXeS01ISoXmezVPg0",{"id":4,"title":5,"body":931,"description":908,"draft":911,"duration":912,"extension":913,"image":914,"kit":1602,"language":920,"level":921,"meta":1603,"navigation":923,"path":924,"pdf":925,"platform":926,"seo":1604,"stem":928,"youtube":908,"__hash__":929},{"type":7,"value":932,"toc":1600},[933],[10,934,935,967,971,975,994,1036,1252,1538,1552,1560],{},[13,936,937,939,947,951],{"title":15},[17,938,19],{},[17,940,22,941,27,943,31,945,35],{},[24,942,26],{"slug":26},[24,944,30],{"slug":30},[24,946,34],{"slug":34},[17,948,38,949,42],{},[24,950,41],{"slug":41},[44,952,953,957],{"color":46,"icon":47},[17,954,955],{},[51,956,53],{},[55,958,959,961,963,965],{},[58,960,60],{},[58,962,63],{},[58,964,66],{},[58,966,69],{},[13,968,969],{"title":72},[74,970],{},[13,972,973],{"title":78},[80,974],{"terms":82},[13,976,977,990],{"title":85},[87,978,979,984,986],{},[58,980,91,981,99],{},[93,982,98],{"href":95,"rel":983},[97],[58,985,102],{},[58,987,105,988,109],{},[51,989,108],{},[17,991,992],{},[113,993],{"alt":115,"src":116},[13,995,996,1004,1026],{"title":119},[17,997,122,998,127,1000,132,1002,136],{},[24,999,126],{"slug":125},[129,1001,131],{},[129,1003,135],{},[87,1005,1006,1010,1014,1020],{},[58,1007,141,1008,136],{},[51,1009,144],{},[58,1011,141,1012,136],{},[51,1013,149],{},[58,1015,152,1016,155,1018,159],{},[129,1017,131],{},[51,1019,158],{},[58,1021,162,1022,165,1024,136],{},[129,1023,135],{},[129,1025,135],{},[44,1027,1028,1032],{"color":170,"icon":171},[17,1029,174,1030,177],{},[129,1031,131],{},[17,1033,174,1034,182],{},[129,1035,135],{},[13,1037,1038,1042,1110,1114,1116,1170,1172,1248],{"title":185},[17,1039,188,1040,192],{},[24,1041,191],{"slug":191},[87,1043,1044,1050,1056,1064,1070,1078,1088,1098,1104],{},[58,1045,141,1046,200,1048,204],{},[51,1047,199],{},[129,1049,203],{},[58,1051,141,1052,210,1054,136],{},[129,1053,209],{},[51,1055,213],{},[58,1057,141,1058,219,1060,223,1062,226],{},[51,1059,218],{},[129,1061,222],{},[129,1063,213],{},[58,1065,229,1066,233,1068,136],{},[51,1067,232],{},[51,1069,236],{},[58,1071,141,1072,200,1074,245,1076,226],{},[51,1073,241],{},[129,1075,244],{},[129,1077,248],{},[58,1079,141,1080,200,1082,257,1084,260,1086,136],{},[51,1081,253],{},[129,1083,256],{},[129,1085,244],{},[51,1087,263],{},[58,1089,141,1090,268,1092,271,1094,274,1096,226],{},[51,1091,144],{},[129,1093,131],{},[51,1095,263],{},[129,1097,244],{},[58,1099,279,1100,233,1102,136],{},[51,1101,282],{},[51,1103,285],{},[58,1105,288,1106,233,1108,136],{},[51,1107,263],{},[51,1109,293],{},[44,1111,1112],{"color":296,"icon":297},[17,1113,300],{},[17,1115,303],{},[87,1117,1118,1126,1132,1140,1148,1156,1162],{},[58,1119,141,1120,200,1122,313,1124,226],{},[51,1121,241],{},[129,1123,312],{},[129,1125,316],{},[58,1127,229,1128,233,1130,136],{},[51,1129,321],{},[51,1131,324],{},[58,1133,141,1134,200,1136,257,1138,226],{},[51,1135,241],{},[129,1137,244],{},[129,1139,312],{},[58,1141,141,1142,200,1144,257,1146,226],{},[51,1143,144],{},[129,1145,131],{},[129,1147,244],{},[58,1149,141,1150,200,1152,313,1154,226],{},[51,1151,218],{},[129,1153,222],{},[129,1155,349],{},[58,1157,229,1158,233,1160,136],{},[51,1159,232],{},[51,1161,356],{},[58,1163,359,1164,362,1166,366,1168,226],{},[129,1165,244],{},[51,1167,365],{},[129,1169,369],{},[17,1171,372],{},[87,1173,1174,1182,1188,1194,1200,1210,1216,1222,1228,1234,1240],{},[58,1175,377,1176,380,1178,383,1180,136],{},[129,1177,222],{},[129,1179,312],{},[51,1181,386],{},[58,1183,377,1184,391,1186,226],{},[129,1185,244],{},[129,1187,394],{},[58,1189,377,1190,380,1192,226],{},[129,1191,369],{},[129,1193,244],{},[58,1195,377,1196,380,1198,226],{},[129,1197,244],{},[129,1199,369],{},[58,1201,377,1202,380,1204,413,1206,233,1208,136],{},[129,1203,369],{},[129,1205,244],{},[51,1207,356],{},[51,1209,418],{},[58,1211,377,1212,380,1214,226],{},[129,1213,244],{},[129,1215,425],{},[58,1217,377,1218,391,1220,226],{},[129,1219,394],{},[129,1221,349],{},[58,1223,377,1224,380,1226,226],{},[129,1225,349],{},[129,1227,394],{},[58,1229,377,1230,380,1232,226],{},[129,1231,369],{},[129,1233,349],{},[58,1235,377,1236,391,1238,226],{},[129,1237,349],{},[129,1239,369],{},[58,1241,141,1242,200,1244,245,1246,226],{},[51,1243,218],{},[129,1245,456],{},[129,1247,349],{},[17,1249,1250],{},[113,1251],{"alt":463,"src":464},[13,1253,1254,1256,1266,1346,1348,1404,1406,1484,1486,1534],{"title":467},[17,1255,470],{},[44,1257,1258,1262,1264],{"color":170,"icon":473},[17,1259,1260],{},[51,1261,478],{},[17,1263,481],{},[17,1265,484],{},[87,1267,1268,1274,1282,1290,1298,1312,1326,1336],{},[58,1269,141,1270,200,1272,204],{},[51,1271,491],{},[129,1273,494],{},[58,1275,141,1276,200,1278,313,1280,226],{},[51,1277,241],{},[24,1279,502],{"slug":501},[129,1281,494],{},[58,1283,141,1284,200,1286,257,1288,226],{},[51,1285,144],{},[129,1287,511],{},[129,1289,502],{},[58,1291,141,1292,200,1294,257,1296,226],{},[51,1293,253],{},[129,1295,520],{},[129,1297,523],{},[58,1299,141,1300,200,1302,257,1304,274,1306,535,1308,233,1310,136],{},[51,1301,253],{},[129,1303,256],{},[51,1305,532],{},[129,1307,520],{},[51,1309,282],{},[51,1311,285],{},[58,1313,141,1314,200,1316,546,1318,274,1320,535,1322,233,1324,136],{},[51,1315,253],{},[129,1317,256],{},[51,1319,263],{},[129,1321,520],{},[51,1323,282],{},[51,1325,555],{},[58,1327,141,1328,200,1330,563,1332,274,1334,226],{},[51,1329,218],{},[129,1331,562],{},[51,1333,263],{},[129,1335,520],{},[58,1337,570,1338,233,1340,576,1342,233,1344,136],{},[51,1339,263],{},[51,1341,575],{},[51,1343,263],{},[51,1345,581],{},[17,1347,584],{},[87,1349,1350,1358,1366,1378,1384,1390,1396],{},[58,1351,141,1352,200,1354,595,1356,226],{},[51,1353,591],{},[129,1355,594],{},[129,1357,523],{},[58,1359,141,1360,200,1362,245,1364,226],{},[51,1361,591],{},[129,1363,604],{},[129,1365,523],{},[58,1367,279,1368,612,1370,616,1372,612,1374,623,1376,136],{},[51,1369,611],{},[51,1371,615],{},[51,1373,619],{},[51,1375,622],{},[51,1377,626],{},[58,1379,359,1380,380,1382,226],{},[129,1381,631],{},[129,1383,634],{},[58,1385,279,1386,612,1388,136],{},[51,1387,611],{},[51,1389,641],{},[58,1391,141,1392,200,1394,648],{},[51,1393,144],{},[129,1395,135],{},[58,1397,141,1398,200,1400,245,1402,226],{},[51,1399,591],{},[129,1401,655],{},[129,1403,658],{},[17,1405,661],{},[87,1407,1408,1416,1424,1430,1438,1446,1454,1460,1468,1474],{},[58,1409,141,1410,669,1412,674,1414,226],{},[51,1411,668],{},[24,1413,673],{"slug":672},[129,1415,655],{},[58,1417,141,1418,669,1420,684,1422,226],{},[51,1419,668],{},[129,1421,683],{},[129,1423,673],{},[58,1425,279,1426,233,1428,136],{},[51,1427,683],{},[51,1429,693],{},[58,1431,141,1432,200,1434,700,1436,226],{},[51,1433,144],{},[129,1435,135],{},[129,1437,673],{},[58,1439,141,1440,200,1442,684,1444,226],{},[51,1441,253],{},[129,1443,709],{},[129,1445,673],{},[58,1447,141,1448,200,1450,257,1452,226],{},[51,1449,144],{},[129,1451,511],{},[129,1453,720],{},[58,1455,229,1456,233,1458,727],{},[51,1457,135],{},[51,1459,131],{},[58,1461,141,1462,200,1464,257,1466,226],{},[51,1463,253],{},[129,1465,256],{},[129,1467,736],{},[58,1469,279,1470,741,1472,744],{},[51,1471,282],{},[51,1473,555],{},[58,1475,141,1476,200,1478,546,1480,274,1482,226],{},[51,1477,144],{},[129,1479,135],{},[51,1481,263],{},[129,1483,736],{},[17,1485,757],{},[87,1487,1488,1496,1504,1512,1520,1526],{},[58,1489,141,1490,669,1492,245,1494,226],{},[51,1491,668],{},[129,1493,673],{},[129,1495,720],{},[58,1497,141,1498,669,1500,684,1502,226],{},[51,1499,668],{},[129,1501,683],{},[129,1503,673],{},[58,1505,141,1506,200,1508,783,1510,226],{},[51,1507,218],{},[129,1509,782],{},[129,1511,673],{},[58,1513,141,1514,200,1516,792,1518,226],{},[51,1515,253],{},[129,1517,709],{},[129,1519,673],{},[58,1521,279,1522,233,1524,136],{},[51,1523,709],{},[51,1525,263],{},[58,1527,141,1528,200,1530,257,1532,226],{},[51,1529,199],{},[129,1531,213],{},[129,1533,809],{},[17,1535,1536],{},[113,1537],{"alt":814,"src":815},[13,1539,1540,1542,1546,1548],{"title":818},[17,1541,821],{},[17,1543,824,1544,109],{},[51,1545,827],{},[17,1547,830],{},[44,1549,1550],{"color":46,"icon":833},[17,1551,836],{},[13,1553,1554],{"title":839},[841,1555,1556],{},[17,1557,1558,848],{},[51,1559,847],{},[13,1561,1562],{"title":851},[853,1563,1564,1572],{},[856,1565,1566],{},[859,1567,1568,1570],{},[862,1569,864],{},[862,1571,867],{},[869,1573,1574,1580,1586,1594],{},[859,1575,1576,1578],{},[874,1577,876],{},[874,1579,879],{},[859,1581,1582,1584],{},[874,1583,884],{},[874,1585,887],{},[859,1587,1588,1590],{},[874,1589,892],{},[874,1591,895,1592,226],{},[129,1593,898],{},[859,1595,1596,1598],{},[874,1597,903],{},[874,1599,906],{},{"title":908,"searchDepth":909,"depth":909,"links":1601},[],[916,917,918,919],{},{"title":5,"description":908},{"id":4,"title":5,"body":1606,"description":908,"draft":911,"duration":912,"extension":913,"image":914,"kit":2277,"language":920,"level":921,"meta":2278,"navigation":923,"path":924,"pdf":925,"platform":926,"seo":2279,"stem":928,"youtube":908,"__hash__":929},{"type":7,"value":1607,"toc":2275},[1608],[10,1609,1610,1642,1646,1650,1669,1711,1927,2213,2227,2235],{},[13,1611,1612,1614,1622,1626],{"title":15},[17,1613,19],{},[17,1615,22,1616,27,1618,31,1620,35],{},[24,1617,26],{"slug":26},[24,1619,30],{"slug":30},[24,1621,34],{"slug":34},[17,1623,38,1624,42],{},[24,1625,41],{"slug":41},[44,1627,1628,1632],{"color":46,"icon":47},[17,1629,1630],{},[51,1631,53],{},[55,1633,1634,1636,1638,1640],{},[58,1635,60],{},[58,1637,63],{},[58,1639,66],{},[58,1641,69],{},[13,1643,1644],{"title":72},[74,1645],{},[13,1647,1648],{"title":78},[80,1649],{"terms":82},[13,1651,1652,1665],{"title":85},[87,1653,1654,1659,1661],{},[58,1655,91,1656,99],{},[93,1657,98],{"href":95,"rel":1658},[97],[58,1660,102],{},[58,1662,105,1663,109],{},[51,1664,108],{},[17,1666,1667],{},[113,1668],{"alt":115,"src":116},[13,1670,1671,1679,1701],{"title":119},[17,1672,122,1673,127,1675,132,1677,136],{},[24,1674,126],{"slug":125},[129,1676,131],{},[129,1678,135],{},[87,1680,1681,1685,1689,1695],{},[58,1682,141,1683,136],{},[51,1684,144],{},[58,1686,141,1687,136],{},[51,1688,149],{},[58,1690,152,1691,155,1693,159],{},[129,1692,131],{},[51,1694,158],{},[58,1696,162,1697,165,1699,136],{},[129,1698,135],{},[129,1700,135],{},[44,1702,1703,1707],{"color":170,"icon":171},[17,1704,174,1705,177],{},[129,1706,131],{},[17,1708,174,1709,182],{},[129,1710,135],{},[13,1712,1713,1717,1785,1789,1791,1845,1847,1923],{"title":185},[17,1714,188,1715,192],{},[24,1716,191],{"slug":191},[87,1718,1719,1725,1731,1739,1745,1753,1763,1773,1779],{},[58,1720,141,1721,200,1723,204],{},[51,1722,199],{},[129,1724,203],{},[58,1726,141,1727,210,1729,136],{},[129,1728,209],{},[51,1730,213],{},[58,1732,141,1733,219,1735,223,1737,226],{},[51,1734,218],{},[129,1736,222],{},[129,1738,213],{},[58,1740,229,1741,233,1743,136],{},[51,1742,232],{},[51,1744,236],{},[58,1746,141,1747,200,1749,245,1751,226],{},[51,1748,241],{},[129,1750,244],{},[129,1752,248],{},[58,1754,141,1755,200,1757,257,1759,260,1761,136],{},[51,1756,253],{},[129,1758,256],{},[129,1760,244],{},[51,1762,263],{},[58,1764,141,1765,268,1767,271,1769,274,1771,226],{},[51,1766,144],{},[129,1768,131],{},[51,1770,263],{},[129,1772,244],{},[58,1774,279,1775,233,1777,136],{},[51,1776,282],{},[51,1778,285],{},[58,1780,288,1781,233,1783,136],{},[51,1782,263],{},[51,1784,293],{},[44,1786,1787],{"color":296,"icon":297},[17,1788,300],{},[17,1790,303],{},[87,1792,1793,1801,1807,1815,1823,1831,1837],{},[58,1794,141,1795,200,1797,313,1799,226],{},[51,1796,241],{},[129,1798,312],{},[129,1800,316],{},[58,1802,229,1803,233,1805,136],{},[51,1804,321],{},[51,1806,324],{},[58,1808,141,1809,200,1811,257,1813,226],{},[51,1810,241],{},[129,1812,244],{},[129,1814,312],{},[58,1816,141,1817,200,1819,257,1821,226],{},[51,1818,144],{},[129,1820,131],{},[129,1822,244],{},[58,1824,141,1825,200,1827,313,1829,226],{},[51,1826,218],{},[129,1828,222],{},[129,1830,349],{},[58,1832,229,1833,233,1835,136],{},[51,1834,232],{},[51,1836,356],{},[58,1838,359,1839,362,1841,366,1843,226],{},[129,1840,244],{},[51,1842,365],{},[129,1844,369],{},[17,1846,372],{},[87,1848,1849,1857,1863,1869,1875,1885,1891,1897,1903,1909,1915],{},[58,1850,377,1851,380,1853,383,1855,136],{},[129,1852,222],{},[129,1854,312],{},[51,1856,386],{},[58,1858,377,1859,391,1861,226],{},[129,1860,244],{},[129,1862,394],{},[58,1864,377,1865,380,1867,226],{},[129,1866,369],{},[129,1868,244],{},[58,1870,377,1871,380,1873,226],{},[129,1872,244],{},[129,1874,369],{},[58,1876,377,1877,380,1879,413,1881,233,1883,136],{},[129,1878,369],{},[129,1880,244],{},[51,1882,356],{},[51,1884,418],{},[58,1886,377,1887,380,1889,226],{},[129,1888,244],{},[129,1890,425],{},[58,1892,377,1893,391,1895,226],{},[129,1894,394],{},[129,1896,349],{},[58,1898,377,1899,380,1901,226],{},[129,1900,349],{},[129,1902,394],{},[58,1904,377,1905,380,1907,226],{},[129,1906,369],{},[129,1908,349],{},[58,1910,377,1911,391,1913,226],{},[129,1912,349],{},[129,1914,369],{},[58,1916,141,1917,200,1919,245,1921,226],{},[51,1918,218],{},[129,1920,456],{},[129,1922,349],{},[17,1924,1925],{},[113,1926],{"alt":463,"src":464},[13,1928,1929,1931,1941,2021,2023,2079,2081,2159,2161,2209],{"title":467},[17,1930,470],{},[44,1932,1933,1937,1939],{"color":170,"icon":473},[17,1934,1935],{},[51,1936,478],{},[17,1938,481],{},[17,1940,484],{},[87,1942,1943,1949,1957,1965,1973,1987,2001,2011],{},[58,1944,141,1945,200,1947,204],{},[51,1946,491],{},[129,1948,494],{},[58,1950,141,1951,200,1953,313,1955,226],{},[51,1952,241],{},[24,1954,502],{"slug":501},[129,1956,494],{},[58,1958,141,1959,200,1961,257,1963,226],{},[51,1960,144],{},[129,1962,511],{},[129,1964,502],{},[58,1966,141,1967,200,1969,257,1971,226],{},[51,1968,253],{},[129,1970,520],{},[129,1972,523],{},[58,1974,141,1975,200,1977,257,1979,274,1981,535,1983,233,1985,136],{},[51,1976,253],{},[129,1978,256],{},[51,1980,532],{},[129,1982,520],{},[51,1984,282],{},[51,1986,285],{},[58,1988,141,1989,200,1991,546,1993,274,1995,535,1997,233,1999,136],{},[51,1990,253],{},[129,1992,256],{},[51,1994,263],{},[129,1996,520],{},[51,1998,282],{},[51,2000,555],{},[58,2002,141,2003,200,2005,563,2007,274,2009,226],{},[51,2004,218],{},[129,2006,562],{},[51,2008,263],{},[129,2010,520],{},[58,2012,570,2013,233,2015,576,2017,233,2019,136],{},[51,2014,263],{},[51,2016,575],{},[51,2018,263],{},[51,2020,581],{},[17,2022,584],{},[87,2024,2025,2033,2041,2053,2059,2065,2071],{},[58,2026,141,2027,200,2029,595,2031,226],{},[51,2028,591],{},[129,2030,594],{},[129,2032,523],{},[58,2034,141,2035,200,2037,245,2039,226],{},[51,2036,591],{},[129,2038,604],{},[129,2040,523],{},[58,2042,279,2043,612,2045,616,2047,612,2049,623,2051,136],{},[51,2044,611],{},[51,2046,615],{},[51,2048,619],{},[51,2050,622],{},[51,2052,626],{},[58,2054,359,2055,380,2057,226],{},[129,2056,631],{},[129,2058,634],{},[58,2060,279,2061,612,2063,136],{},[51,2062,611],{},[51,2064,641],{},[58,2066,141,2067,200,2069,648],{},[51,2068,144],{},[129,2070,135],{},[58,2072,141,2073,200,2075,245,2077,226],{},[51,2074,591],{},[129,2076,655],{},[129,2078,658],{},[17,2080,661],{},[87,2082,2083,2091,2099,2105,2113,2121,2129,2135,2143,2149],{},[58,2084,141,2085,669,2087,674,2089,226],{},[51,2086,668],{},[24,2088,673],{"slug":672},[129,2090,655],{},[58,2092,141,2093,669,2095,684,2097,226],{},[51,2094,668],{},[129,2096,683],{},[129,2098,673],{},[58,2100,279,2101,233,2103,136],{},[51,2102,683],{},[51,2104,693],{},[58,2106,141,2107,200,2109,700,2111,226],{},[51,2108,144],{},[129,2110,135],{},[129,2112,673],{},[58,2114,141,2115,200,2117,684,2119,226],{},[51,2116,253],{},[129,2118,709],{},[129,2120,673],{},[58,2122,141,2123,200,2125,257,2127,226],{},[51,2124,144],{},[129,2126,511],{},[129,2128,720],{},[58,2130,229,2131,233,2133,727],{},[51,2132,135],{},[51,2134,131],{},[58,2136,141,2137,200,2139,257,2141,226],{},[51,2138,253],{},[129,2140,256],{},[129,2142,736],{},[58,2144,279,2145,741,2147,744],{},[51,2146,282],{},[51,2148,555],{},[58,2150,141,2151,200,2153,546,2155,274,2157,226],{},[51,2152,144],{},[129,2154,135],{},[51,2156,263],{},[129,2158,736],{},[17,2160,757],{},[87,2162,2163,2171,2179,2187,2195,2201],{},[58,2164,141,2165,669,2167,245,2169,226],{},[51,2166,668],{},[129,2168,673],{},[129,2170,720],{},[58,2172,141,2173,669,2175,684,2177,226],{},[51,2174,668],{},[129,2176,683],{},[129,2178,673],{},[58,2180,141,2181,200,2183,783,2185,226],{},[51,2182,218],{},[129,2184,782],{},[129,2186,673],{},[58,2188,141,2189,200,2191,792,2193,226],{},[51,2190,253],{},[129,2192,709],{},[129,2194,673],{},[58,2196,279,2197,233,2199,136],{},[51,2198,709],{},[51,2200,263],{},[58,2202,141,2203,200,2205,257,2207,226],{},[51,2204,199],{},[129,2206,213],{},[129,2208,809],{},[17,2210,2211],{},[113,2212],{"alt":814,"src":815},[13,2214,2215,2217,2221,2223],{"title":818},[17,2216,821],{},[17,2218,824,2219,109],{},[51,2220,827],{},[17,2222,830],{},[44,2224,2225],{"color":46,"icon":833},[17,2226,836],{},[13,2228,2229],{"title":839},[841,2230,2231],{},[17,2232,2233,848],{},[51,2234,847],{},[13,2236,2237],{"title":851},[853,2238,2239,2247],{},[856,2240,2241],{},[859,2242,2243,2245],{},[862,2244,864],{},[862,2246,867],{},[869,2248,2249,2255,2261,2269],{},[859,2250,2251,2253],{},[874,2252,876],{},[874,2254,879],{},[859,2256,2257,2259],{},[874,2258,884],{},[874,2260,887],{},[859,2262,2263,2265],{},[874,2264,892],{},[874,2266,895,2267,226],{},[129,2268,898],{},[859,2270,2271,2273],{},[874,2272,903],{},[874,2274,906],{},{"title":908,"searchDepth":909,"depth":909,"links":2276},[],[916,917,918,919],{},{"title":5,"description":908},[2281,2294,2306,2318,2330,2343,2356,2368,2381,2393,2405,2418,2430,2442,2454,2466,2478,2490,2502,2514,2525,2537,2549,2561,2573,2585,2597,2609,2621,2633],{"id":2282,"category":2283,"definition":2284,"example":2285,"extension":913,"meta":2286,"stem":2291,"term":2292,"__hash__":2293},"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":2287},{"type":7,"value":2288,"toc":2289},[],{"title":908,"searchDepth":909,"depth":909,"links":2290},[],"glossary\u002Faccelerometer","Accelerometer","ksJj58OEPP72c3cASeHPlPiw73FfxxUbtIkoEIYW2Rc",{"id":2295,"category":2283,"definition":2296,"example":2297,"extension":913,"meta":2298,"stem":2303,"term":2304,"__hash__":2305},"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":2299},{"type":7,"value":2300,"toc":2301},[],{"title":908,"searchDepth":909,"depth":909,"links":2302},[],"glossary\u002Fbutton","Button","PgfcNSpG1mpSW_fVJZZMkF4D6eYiQLiyKWeq6_CXsMA",{"id":2307,"category":2283,"definition":2308,"example":2309,"extension":913,"meta":2310,"stem":2315,"term":2316,"__hash__":2317},"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":2311},{"type":7,"value":2312,"toc":2313},[],{"title":908,"searchDepth":909,"depth":909,"links":2314},[],"glossary\u002Fbuzzer","Buzzer","L0-h_InzgZ_gB0Iy3IE-ojdFF0cXjdB2AxJY0QU0VpU",{"id":2319,"category":668,"definition":2320,"example":2321,"extension":913,"meta":2322,"stem":2327,"term":2328,"__hash__":2329},"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":2323},{"type":7,"value":2324,"toc":2325},[],{"title":908,"searchDepth":909,"depth":909,"links":2326},[],"glossary\u002Fcomparison-operators","Comparison Operators","PPG3NDp3Xsx9FclsvC7ertn8IDeBVjhCknFTN17UIaU",{"id":2331,"category":2332,"definition":2333,"example":2334,"extension":913,"meta":2335,"stem":2340,"term":2341,"__hash__":2342},"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":2336},{"type":7,"value":2337,"toc":2338},[],{"title":908,"searchDepth":909,"depth":909,"links":2339},[],"glossary\u002Fforever-loop","Forever loop","1j2cYaiR3yKeoh54w9Vg2aWr_cEXEtj7F0WCR3_jdc0",{"id":2344,"category":2345,"definition":2346,"example":2347,"extension":913,"meta":2348,"stem":2353,"term":2354,"__hash__":2355},"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":2349},{"type":7,"value":2350,"toc":2351},[],{"title":908,"searchDepth":909,"depth":909,"links":2352},[],"glossary\u002Ffrequency","Frequency","XY4AeY0bsJaqF0XBjkEAvTSzqxdpPPLt09Z_LbZSjPg",{"id":2357,"category":2332,"definition":2358,"example":2359,"extension":913,"meta":2360,"stem":2365,"term":2366,"__hash__":2367},"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":2361},{"type":7,"value":2362,"toc":2363},[],{"title":908,"searchDepth":909,"depth":909,"links":2364},[],"glossary\u002Ffunction","Function","0aEVvGRMWsAC1qXngj6QCHxCoIn1mWfHYBBi95ayuLE",{"id":2369,"category":2370,"definition":2371,"example":2372,"extension":913,"meta":2373,"stem":2378,"term":2379,"__hash__":2380},"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":2374},{"type":7,"value":2375,"toc":2376},[],{"title":908,"searchDepth":909,"depth":909,"links":2377},[],"glossary\u002Fide-code-editor","IDE (code editor)","yc7Eds8WdmrIM56FGlCmMtjhoodKwT1IUvQCC9bsvKs",{"id":2382,"category":668,"definition":2383,"example":2384,"extension":913,"meta":2385,"stem":2390,"term":2391,"__hash__":2392},"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":2386},{"type":7,"value":2387,"toc":2388},[],{"title":908,"searchDepth":909,"depth":909,"links":2389},[],"glossary\u002Fif-statement","If statement","3uYmpX5sGUnkc327qCP_EkL6IGkFiginfOP39Kstry8",{"id":2394,"category":2332,"definition":2395,"example":2396,"extension":913,"meta":2397,"stem":2402,"term":2403,"__hash__":2404},"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":2398},{"type":7,"value":2399,"toc":2400},[],{"title":908,"searchDepth":909,"depth":909,"links":2401},[],"glossary\u002Fimporting-libraries","Importing Libraries","Wqj3o2kxbFQa44LtzhYfeDYluwIPxxWChkL00OD1LqI",{"id":2406,"category":2407,"definition":2408,"example":2409,"extension":913,"meta":2410,"stem":2415,"term":2416,"__hash__":2417},"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":2411},{"type":7,"value":2412,"toc":2413},[],{"title":908,"searchDepth":909,"depth":909,"links":2414},[],"glossary\u002Finteger","Integer","lktbVeg3VEBLF2Jg3R_EKdjEowVZeabE1gPnGpI2OXY",{"id":2419,"category":2283,"definition":2420,"example":2421,"extension":913,"meta":2422,"stem":2427,"term":2428,"__hash__":2429},"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":2423},{"type":7,"value":2424,"toc":2425},[],{"title":908,"searchDepth":909,"depth":909,"links":2426},[],"glossary\u002Fled","LED","M41j-xq46HhMvOjtpYSjfy0ypnoMYVzgeqVGSuyVciY",{"id":2431,"category":2283,"definition":2432,"example":2433,"extension":913,"meta":2434,"stem":2439,"term":2440,"__hash__":2441},"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":2435},{"type":7,"value":2436,"toc":2437},[],{"title":908,"searchDepth":909,"depth":909,"links":2438},[],"glossary\u002Fled-matrix","LED Matrix","KfPJAm7v5EXlm2ejZZLldfB4w7zOMZQhbrmsqxpqJi8",{"id":2443,"category":2283,"definition":2444,"example":2445,"extension":913,"meta":2446,"stem":2451,"term":2452,"__hash__":2453},"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":2447},{"type":7,"value":2448,"toc":2449},[],{"title":908,"searchDepth":909,"depth":909,"links":2450},[],"glossary\u002Flight-sensor","Light Sensor","tEERMTJO24JmYYlQoIO7DxY9yXg0GNehs78E_LQL28U",{"id":2455,"category":2283,"definition":2456,"example":2457,"extension":913,"meta":2458,"stem":2463,"term":2464,"__hash__":2465},"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":2459},{"type":7,"value":2460,"toc":2461},[],{"title":908,"searchDepth":909,"depth":909,"links":2462},[],"glossary\u002Fmicro-bit","micro:bit","GZPIPrw-9_LkW4seKGxZt6hAdg8MO_A_wOS-mN4qDTg",{"id":2467,"category":2370,"definition":2468,"example":2469,"extension":913,"meta":2470,"stem":2475,"term":2476,"__hash__":2477},"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":2471},{"type":7,"value":2472,"toc":2473},[],{"title":908,"searchDepth":909,"depth":909,"links":2474},[],"glossary\u002Fmillisecond","Millisecond","2TwuImc8S9MyMSqRFO3i6iHVCdsxyJ_S9N_BxGbZL-8",{"id":2479,"category":2283,"definition":2480,"example":2481,"extension":913,"meta":2482,"stem":2487,"term":2488,"__hash__":2489},"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":2483},{"type":7,"value":2484,"toc":2485},[],{"title":908,"searchDepth":909,"depth":909,"links":2486},[],"glossary\u002Fmodule","Module","IDLrS2CrlwNauzAWoCd7V16aO_ygDWyjp11bMsfuwO0",{"id":2491,"category":2283,"definition":2492,"example":2493,"extension":913,"meta":2494,"stem":2499,"term":2500,"__hash__":2501},"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":2495},{"type":7,"value":2496,"toc":2497},[],{"title":908,"searchDepth":909,"depth":909,"links":2498},[],"glossary\u002Fmotor-controller","Motor controller","McSSBLd3fPtYq-o2LUQBhW3pBeEmMSjF6cnb2O9ectE",{"id":2503,"category":2283,"definition":2504,"example":2505,"extension":913,"meta":2506,"stem":2511,"term":2512,"__hash__":2513},"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":2507},{"type":7,"value":2508,"toc":2509},[],{"title":908,"searchDepth":909,"depth":909,"links":2510},[],"glossary\u002Foled-screen","OLED screen","14SaCtmWj71MOziFuPIW377cynK4FRv5TsdEx4fGGFk",{"id":2515,"category":2283,"definition":2516,"example":2517,"extension":913,"meta":2518,"stem":2523,"term":494,"__hash__":2524},"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":2519},{"type":7,"value":2520,"toc":2521},[],{"title":908,"searchDepth":909,"depth":909,"links":2522},[],"glossary\u002Fpicobricks","TeGs24I-3fkAdlpiuQPPBDUO8EKBe8PS1ewHaj-w5_s",{"id":2526,"category":2283,"definition":2527,"example":2528,"extension":913,"meta":2529,"stem":2534,"term":2535,"__hash__":2536},"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":2530},{"type":7,"value":2531,"toc":2532},[],{"title":908,"searchDepth":909,"depth":909,"links":2533},[],"glossary\u002Fpotentiometer","Potentiometer","ohP2krcKZLkMtpI44R32nhDVwImLmSBQWP6SOArsh6M",{"id":2538,"category":2332,"definition":2539,"example":2540,"extension":913,"meta":2541,"stem":2546,"term":2547,"__hash__":2548},"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":2542},{"type":7,"value":2543,"toc":2544},[],{"title":908,"searchDepth":909,"depth":909,"links":2545},[],"glossary\u002Frandom","Random","LkGfQKwUNfJ_TPXihwPveX2JeJ9-BB7DpUire9a2pqI",{"id":2550,"category":2283,"definition":2551,"example":2552,"extension":913,"meta":2553,"stem":2558,"term":2559,"__hash__":2560},"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":2554},{"type":7,"value":2555,"toc":2556},[],{"title":908,"searchDepth":909,"depth":909,"links":2557},[],"glossary\u002Fraspberry-pi-pico","Raspberry Pi Pico","HVa7r-PC6I5-DVcDdOULsBHP6h7V4SafhFtdazcSWYg",{"id":2562,"category":2332,"definition":2563,"example":2564,"extension":913,"meta":2565,"stem":2570,"term":2571,"__hash__":2572},"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":2566},{"type":7,"value":2567,"toc":2568},[],{"title":908,"searchDepth":909,"depth":909,"links":2569},[],"glossary\u002Frepeat-loop","Repeat loop","YC2iTUQ841lfmltd6Pkq89uuQbk29RWgR-rWs7MvjJ4",{"id":2574,"category":2283,"definition":2575,"example":2576,"extension":913,"meta":2577,"stem":2582,"term":2583,"__hash__":2584},"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":2578},{"type":7,"value":2579,"toc":2580},[],{"title":908,"searchDepth":909,"depth":909,"links":2581},[],"glossary\u002Frgb-led","RGB LED","mIu-76nYeQtI-NsTMcvPueLH11JE0fC5X2jJxBmKwPU",{"id":2586,"category":2283,"definition":2587,"example":2588,"extension":913,"meta":2589,"stem":2594,"term":2595,"__hash__":2596},"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":2590},{"type":7,"value":2591,"toc":2592},[],{"title":908,"searchDepth":909,"depth":909,"links":2593},[],"glossary\u002Fservo-motor","Servo motor","IFtMLIEoNZ746ebquvkvp-PAqDQObQACMiWUTb3rfZ8",{"id":2598,"category":2283,"definition":2599,"example":2600,"extension":913,"meta":2601,"stem":2606,"term":2607,"__hash__":2608},"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":2602},{"type":7,"value":2603,"toc":2604},[],{"title":908,"searchDepth":909,"depth":909,"links":2605},[],"glossary\u002Ftemperature-sensor","Temperature sensor","UbSScS-TCPLSFDjnxsaFltpoKbORTAOaxh68b_-FMw8",{"id":2610,"category":668,"definition":2611,"example":2612,"extension":913,"meta":2613,"stem":2618,"term":2619,"__hash__":2620},"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":2614},{"type":7,"value":2615,"toc":2616},[],{"title":908,"searchDepth":909,"depth":909,"links":2617},[],"glossary\u002Fthreshold","Threshold","xikcgh-PcWY0Z_HhDY16B8SLJLbL0oJD8WUU3KpHqvY",{"id":2622,"category":2407,"definition":2623,"example":2624,"extension":913,"meta":2625,"stem":2630,"term":2631,"__hash__":2632},"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":2626},{"type":7,"value":2627,"toc":2628},[],{"title":908,"searchDepth":909,"depth":909,"links":2629},[],"glossary\u002Fvariable","Variable","nlzJUTSGqyIAKSbopFF01oPBuJT59zOT7MSoCpOMp1E",{"id":2634,"category":2332,"definition":2635,"example":2636,"extension":913,"meta":2637,"stem":2642,"term":2643,"__hash__":2644},"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":2638},{"type":7,"value":2639,"toc":2640},[],{"title":908,"searchDepth":909,"depth":909,"links":2641},[],"glossary\u002Fwhile-loop","While loop","igK-e_snGhkP0kgSn6sPO7YQybQ0WpDfQMB0_8I2iZg",[2646,2652,2658,2664,2670,2676,2682,2688,2694,2700,2706,2712,2718,2724,2730,2736,2742,2748,2754,2760,2766,2772,2778,2784,2790,2796,2802,2808,2814,2820],{"id":2282,"category":2283,"definition":2284,"example":2285,"extension":913,"meta":2647,"stem":2291,"term":2292,"__hash__":2293},{"body":2648},{"type":7,"value":2649,"toc":2650},[],{"title":908,"searchDepth":909,"depth":909,"links":2651},[],{"id":2295,"category":2283,"definition":2296,"example":2297,"extension":913,"meta":2653,"stem":2303,"term":2304,"__hash__":2305},{"body":2654},{"type":7,"value":2655,"toc":2656},[],{"title":908,"searchDepth":909,"depth":909,"links":2657},[],{"id":2307,"category":2283,"definition":2308,"example":2309,"extension":913,"meta":2659,"stem":2315,"term":2316,"__hash__":2317},{"body":2660},{"type":7,"value":2661,"toc":2662},[],{"title":908,"searchDepth":909,"depth":909,"links":2663},[],{"id":2319,"category":668,"definition":2320,"example":2321,"extension":913,"meta":2665,"stem":2327,"term":2328,"__hash__":2329},{"body":2666},{"type":7,"value":2667,"toc":2668},[],{"title":908,"searchDepth":909,"depth":909,"links":2669},[],{"id":2331,"category":2332,"definition":2333,"example":2334,"extension":913,"meta":2671,"stem":2340,"term":2341,"__hash__":2342},{"body":2672},{"type":7,"value":2673,"toc":2674},[],{"title":908,"searchDepth":909,"depth":909,"links":2675},[],{"id":2344,"category":2345,"definition":2346,"example":2347,"extension":913,"meta":2677,"stem":2353,"term":2354,"__hash__":2355},{"body":2678},{"type":7,"value":2679,"toc":2680},[],{"title":908,"searchDepth":909,"depth":909,"links":2681},[],{"id":2357,"category":2332,"definition":2358,"example":2359,"extension":913,"meta":2683,"stem":2365,"term":2366,"__hash__":2367},{"body":2684},{"type":7,"value":2685,"toc":2686},[],{"title":908,"searchDepth":909,"depth":909,"links":2687},[],{"id":2369,"category":2370,"definition":2371,"example":2372,"extension":913,"meta":2689,"stem":2378,"term":2379,"__hash__":2380},{"body":2690},{"type":7,"value":2691,"toc":2692},[],{"title":908,"searchDepth":909,"depth":909,"links":2693},[],{"id":2382,"category":668,"definition":2383,"example":2384,"extension":913,"meta":2695,"stem":2390,"term":2391,"__hash__":2392},{"body":2696},{"type":7,"value":2697,"toc":2698},[],{"title":908,"searchDepth":909,"depth":909,"links":2699},[],{"id":2394,"category":2332,"definition":2395,"example":2396,"extension":913,"meta":2701,"stem":2402,"term":2403,"__hash__":2404},{"body":2702},{"type":7,"value":2703,"toc":2704},[],{"title":908,"searchDepth":909,"depth":909,"links":2705},[],{"id":2406,"category":2407,"definition":2408,"example":2409,"extension":913,"meta":2707,"stem":2415,"term":2416,"__hash__":2417},{"body":2708},{"type":7,"value":2709,"toc":2710},[],{"title":908,"searchDepth":909,"depth":909,"links":2711},[],{"id":2419,"category":2283,"definition":2420,"example":2421,"extension":913,"meta":2713,"stem":2427,"term":2428,"__hash__":2429},{"body":2714},{"type":7,"value":2715,"toc":2716},[],{"title":908,"searchDepth":909,"depth":909,"links":2717},[],{"id":2431,"category":2283,"definition":2432,"example":2433,"extension":913,"meta":2719,"stem":2439,"term":2440,"__hash__":2441},{"body":2720},{"type":7,"value":2721,"toc":2722},[],{"title":908,"searchDepth":909,"depth":909,"links":2723},[],{"id":2443,"category":2283,"definition":2444,"example":2445,"extension":913,"meta":2725,"stem":2451,"term":2452,"__hash__":2453},{"body":2726},{"type":7,"value":2727,"toc":2728},[],{"title":908,"searchDepth":909,"depth":909,"links":2729},[],{"id":2467,"category":2370,"definition":2468,"example":2469,"extension":913,"meta":2731,"stem":2475,"term":2476,"__hash__":2477},{"body":2732},{"type":7,"value":2733,"toc":2734},[],{"title":908,"searchDepth":909,"depth":909,"links":2735},[],{"id":2479,"category":2283,"definition":2480,"example":2481,"extension":913,"meta":2737,"stem":2487,"term":2488,"__hash__":2489},{"body":2738},{"type":7,"value":2739,"toc":2740},[],{"title":908,"searchDepth":909,"depth":909,"links":2741},[],{"id":2491,"category":2283,"definition":2492,"example":2493,"extension":913,"meta":2743,"stem":2499,"term":2500,"__hash__":2501},{"body":2744},{"type":7,"value":2745,"toc":2746},[],{"title":908,"searchDepth":909,"depth":909,"links":2747},[],{"id":2503,"category":2283,"definition":2504,"example":2505,"extension":913,"meta":2749,"stem":2511,"term":2512,"__hash__":2513},{"body":2750},{"type":7,"value":2751,"toc":2752},[],{"title":908,"searchDepth":909,"depth":909,"links":2753},[],{"id":2515,"category":2283,"definition":2516,"example":2517,"extension":913,"meta":2755,"stem":2523,"term":494,"__hash__":2524},{"body":2756},{"type":7,"value":2757,"toc":2758},[],{"title":908,"searchDepth":909,"depth":909,"links":2759},[],{"id":2526,"category":2283,"definition":2527,"example":2528,"extension":913,"meta":2761,"stem":2534,"term":2535,"__hash__":2536},{"body":2762},{"type":7,"value":2763,"toc":2764},[],{"title":908,"searchDepth":909,"depth":909,"links":2765},[],{"id":2574,"category":2283,"definition":2575,"example":2576,"extension":913,"meta":2767,"stem":2582,"term":2583,"__hash__":2584},{"body":2768},{"type":7,"value":2769,"toc":2770},[],{"title":908,"searchDepth":909,"depth":909,"links":2771},[],{"id":2538,"category":2332,"definition":2539,"example":2540,"extension":913,"meta":2773,"stem":2546,"term":2547,"__hash__":2548},{"body":2774},{"type":7,"value":2775,"toc":2776},[],{"title":908,"searchDepth":909,"depth":909,"links":2777},[],{"id":2550,"category":2283,"definition":2551,"example":2552,"extension":913,"meta":2779,"stem":2558,"term":2559,"__hash__":2560},{"body":2780},{"type":7,"value":2781,"toc":2782},[],{"title":908,"searchDepth":909,"depth":909,"links":2783},[],{"id":2562,"category":2332,"definition":2563,"example":2564,"extension":913,"meta":2785,"stem":2570,"term":2571,"__hash__":2572},{"body":2786},{"type":7,"value":2787,"toc":2788},[],{"title":908,"searchDepth":909,"depth":909,"links":2789},[],{"id":2586,"category":2283,"definition":2587,"example":2588,"extension":913,"meta":2791,"stem":2594,"term":2595,"__hash__":2596},{"body":2792},{"type":7,"value":2793,"toc":2794},[],{"title":908,"searchDepth":909,"depth":909,"links":2795},[],{"id":2598,"category":2283,"definition":2599,"example":2600,"extension":913,"meta":2797,"stem":2606,"term":2607,"__hash__":2608},{"body":2798},{"type":7,"value":2799,"toc":2800},[],{"title":908,"searchDepth":909,"depth":909,"links":2801},[],{"id":2610,"category":668,"definition":2611,"example":2612,"extension":913,"meta":2803,"stem":2618,"term":2619,"__hash__":2620},{"body":2804},{"type":7,"value":2805,"toc":2806},[],{"title":908,"searchDepth":909,"depth":909,"links":2807},[],{"id":2622,"category":2407,"definition":2623,"example":2624,"extension":913,"meta":2809,"stem":2630,"term":2631,"__hash__":2632},{"body":2810},{"type":7,"value":2811,"toc":2812},[],{"title":908,"searchDepth":909,"depth":909,"links":2813},[],{"id":2634,"category":2332,"definition":2635,"example":2636,"extension":913,"meta":2815,"stem":2642,"term":2643,"__hash__":2644},{"body":2816},{"type":7,"value":2817,"toc":2818},[],{"title":908,"searchDepth":909,"depth":909,"links":2819},[],{"id":2455,"category":2283,"definition":2456,"example":2457,"extension":913,"meta":2821,"stem":2463,"term":2464,"__hash__":2465},{"body":2822},{"type":7,"value":2823,"toc":2824},[],{"title":908,"searchDepth":909,"depth":909,"links":2825},[],1788101567213]