pxt-microbit 5.1.26 → 5.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/sim.d.ts +4 -0
- package/built/sim.js +105 -43
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.json +1 -1
- package/built/theme.json +1 -1
- package/docs/courses/logic-lab/elements.md +8 -1
- package/docs/courses/logic-lab/explorer.md +11 -4
- package/docs/courses/logic-lab/expressions.md +10 -4
- package/docs/courses/logic-lab/logic-gates.md +7 -1
- package/docs/courses/logic-lab/programmable.md +3 -3
- package/docs/courses/logic-lab.md +7 -1
- package/package.json +2 -2
- package/pxtarget.json +2 -2
package/built/targetlight.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"microbit","nickname":"microbit","name":"makecode.microbit.org","title":"Microsoft MakeCode for micro:bit","description":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","corepkg":"core","cloud":{"workspace":false,"packages":true,"sharing":true,"thumbnails":true,"publishing":true,"importing":true,"showBadges":false,"preferredPackages":["Microsoft/pxt-neopixel"],"githubPackages":true,"cloudProviders":{"github":{"id":"github","name":"GitHub","icon":"./static/providers/github-mark.png","identity":false,"order":3},"microsoft":{"id":"microsoft","name":"Microsoft","icon":"./static/providers/microsoft-logo.svg","identity":true,"redirect":true,"order":1},"google":{"id":"google","name":"Google","icon":"./static/providers/google-logo.svg","identity":true,"redirect":true,"order":2}}},"compile":{"isNative":false,"hasHex":true,"deployDrives":"(MICROBIT|MBED)","driveName":"MICROBIT","hexMimeType":"application/x-microbit-hex","openocdScript":"source [find interface/cmsis-dap.cfg]; source [find target/nrf51.cfg]","flashUsableEnd":242688,"flashEnd":242688,"flashCodeAlign":1024,"floatingPoint":true,"taggedInts":true,"utf8":false,"gc":true,"imageRefTag":9,"shimRenames":{"sendBufferAsm":"light::sendWS2812Buffer"},"patches":{"0.0.0 - 1.0.0":[{"type":"package","map":{"microbit":"core","microbit-bluetooth":"bluetooth","microbit-radio":"radio","microbit-devices":"devices","microbit-led":"","microbit-music":"","microbit-game":"","microbit-pins":"","microbit-serial":""}},{"type":"missingPackage","map":{"radio\\s*\\.":"radio","bluetooth\\s*\\.":"bluetooth","devices\\s*\\.":"devices"}},{"type":"api","map":{"bluetooth\\s*\\.\\s*uartRead\\s*\\((.*?)\\)":"bluetooth.uartReadUntil($1)","bluetooth\\s*\\.\\s*uartWrite\\s*\\((.*?)\\)":"bluetooth.uartWriteUntil($1)","input\\s*\\.\\s*calibrate\\s*\\(":"input.calibrateCompass(","radio\\s*\\.\\s*onDataPacketReceived\\(\\s*\\(\\{\\s*receivedNumber\\s*\\}\\)\\s*=>\\s*\\{":"radio.onReceivedNumber(function (receivedNumber) {","radio\\s*\\.\\s*onDataPacketReceived\\(\\s*\\(\\{\\s*receivedString: name, receivedNumber: value\\s*\\}\\)\\s*=>\\s*\\{":"radio.onReceivedValue(function (name, value) {","radio\\s*\\.\\s*onDataPacketReceived\\(\\s*\\(\\{\\s*receivedString\\s*\\}\\)\\s*=>\\s*\\{":"radio.onReceivedString(function (receivedString) {","Math\\s*\\.\\s*random\\s*\\(":"Math.randomRange(0, "}},{"type":"blockId","map":{"device_get_acceleration":"device_acceleration"}},{"type":"blockValue","map":{"device_print_message.message":"text"}}],"0.0.0 - 1.4.12":[{"type":"api","map":{"DisplayMode\\s*\\.\\s*BackAndWhite":"DisplayMode.BlackAndWhite"}}],"0.0.0 - 3.1.10":[{"type":"package","map":{"pxt-microbit-v2-extension":"microphone"}}],"0.0.0 - 3.0.18":[{"type":"missingPackage","map":{".*":"microphone"}}]},"hidSelectors":[{"usagePage":"0xFF00","usageId":"0x0001","vid":"0x0d28","pid":"0x0204"}],"webUSB":true,"useNewFunctions":true,"nativeType":"thumb","switches":{},"jsRefCounting":false,"noSourceInFlash":true},"compileService":{"yottaTarget":"bbc-microbit-classic-gcc@https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc","yottaCorePackage":"microbit","githubCorePackage":"lancaster-university/microbit","gittag":"v2.2.0-rc6","serviceId":"microbit","dockerImage":"pext/yotta:update-yotta3","yottaBinary":"pxt-microbit-app-combined.hex"},"multiVariants":["mbdal","mbcodal"],"alwaysMultiVariant":true,"variants":{"mbdal":{"compile":{},"compileService":{}},"mbcodal":{"compile":{"flashCodeAlign":4096,"flashUsableEnd":487424,"flashEnd":524288},"compileService":{"buildEngine":"codal","codalTarget":{"name":"codal-microbit-v2","url":"https://github.com/lancaster-university/codal-microbit-v2","branch":"v0.2.50","type":"git"},"codalBinary":"MICROBIT","githubCorePackage":"lancaster-university/microbit-v2-samples","gittag":"v0.2.12","serviceId":"mbcodal2","dockerImage":"pext/yotta:update-yotta3","yottaConfigCompatibility":true}}},"runtime":{"mathBlocks":true,"loopsBlocks":true,"logicBlocks":true,"variablesBlocks":true,"textBlocks":true,"listsBlocks":true,"functionBlocks":true,"breakBlock":true,"continueBlock":true,"functionsOptions":{"useNewFunctions":true,"extraFunctionEditorTypes":[{"typeName":"game.LedSprite","label":"LedSprite","icon":"send","defaultName":"sprite"},{"typeName":"Image","label":"Image","icon":"image outline","defaultName":"image"}]},"onStartColor":"#1E90FF","onStartNamespace":"basic","onStartWeight":54},"simulator":{"autoRun":true,"streams":false,"aspectRatio":1.22,"parts":true,"partsAspectRatio":0.69,"messageSimulators":{"jacdac":{"url":"https://microsoft.github.io/jacdac-docs/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","localHostUrl":"http://localhost:8000/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","aspectRatio":1.22,"permanent":true}},"boardDefinition":{"visual":"microbit","gpioPinBlocks":[["P0"],["P1"],["P2"],["P3"],["P4","P5","P6","P7"],["P8","P9","P10","P11","P12"],["P16"]],"gpioPinMap":{"P0":"P0","P1":"P1","P2":"P2","P3":"P3","P4":"P4","P5":"P5","P6":"P6","P7":"P7","P8":"P8","P9":"P9","P10":"P10","P11":"P11","P12":"P12","P13":"P13","P14":"P14","P15":"P15","P16":"P16","P19":"P19","P20":"P20"},"spiPins":{"MOSI":"P15","MISO":"P14","SCK":"P13"},"i2cPins":{"SDA":"P20","SCL":"P19"},"analogInPins":["P0","P1","P2","P3","P10"],"groundPins":["GND"],"threeVoltPins":["+3v3"],"attachPowerOnRight":true,"onboardComponents":["accelerometer","buttonpair","ledmatrix","speaker","bluetooth","thermometer","compass","builtinspeaker","microphone","logotouch","flashlog","v2"],"pinStyles":{"P0":"croc","P1":"croc","P2":"croc","GND":"croc","+3v3":"croc"},"marginWhenBreadboarding":[0,0,80,0]}},"serial":{"nameFilter":"^(mbed Serial Port|DAPLink CMSIS-DAP)","log":true,"useEditor":true,"editorTheme":{"graphBackground":"#d9d9d9","lineColors":["#6633cc","#3891A6","#3454D1","#EF767A","#F46197","#107C10"]},"vendorId":"0x0d28","productId":"0x0204","rawHID":true},"queryVariants":{"hidemenu":{"appTheme":{"hideMenuBar":true}},"androidapp":{"compile":{"webUSB":false},"appTheme":{"disableBlobObjectDownload":true}},"clever=1":{"cloud":{"cloudProviders":{"clever":{"id":"clever","name":"Clever","icon":"./static/providers/clever-logo.png","identity":true,"redirect":true,"order":3}}}}},"uploadDocs":true,"versions":{"branch":"v5.1.
|
|
1
|
+
{"id":"microbit","nickname":"microbit","name":"makecode.microbit.org","title":"Microsoft MakeCode for micro:bit","description":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","corepkg":"core","cloud":{"workspace":false,"packages":true,"sharing":true,"thumbnails":true,"publishing":true,"importing":true,"showBadges":false,"preferredPackages":["Microsoft/pxt-neopixel"],"githubPackages":true,"cloudProviders":{"github":{"id":"github","name":"GitHub","icon":"./static/providers/github-mark.png","identity":false,"order":3},"microsoft":{"id":"microsoft","name":"Microsoft","icon":"./static/providers/microsoft-logo.svg","identity":true,"redirect":true,"order":1},"google":{"id":"google","name":"Google","icon":"./static/providers/google-logo.svg","identity":true,"redirect":true,"order":2}}},"compile":{"isNative":false,"hasHex":true,"deployDrives":"(MICROBIT|MBED)","driveName":"MICROBIT","hexMimeType":"application/x-microbit-hex","openocdScript":"source [find interface/cmsis-dap.cfg]; source [find target/nrf51.cfg]","flashUsableEnd":242688,"flashEnd":242688,"flashCodeAlign":1024,"floatingPoint":true,"taggedInts":true,"utf8":false,"gc":true,"imageRefTag":9,"shimRenames":{"sendBufferAsm":"light::sendWS2812Buffer"},"patches":{"0.0.0 - 1.0.0":[{"type":"package","map":{"microbit":"core","microbit-bluetooth":"bluetooth","microbit-radio":"radio","microbit-devices":"devices","microbit-led":"","microbit-music":"","microbit-game":"","microbit-pins":"","microbit-serial":""}},{"type":"missingPackage","map":{"radio\\s*\\.":"radio","bluetooth\\s*\\.":"bluetooth","devices\\s*\\.":"devices"}},{"type":"api","map":{"bluetooth\\s*\\.\\s*uartRead\\s*\\((.*?)\\)":"bluetooth.uartReadUntil($1)","bluetooth\\s*\\.\\s*uartWrite\\s*\\((.*?)\\)":"bluetooth.uartWriteUntil($1)","input\\s*\\.\\s*calibrate\\s*\\(":"input.calibrateCompass(","radio\\s*\\.\\s*onDataPacketReceived\\(\\s*\\(\\{\\s*receivedNumber\\s*\\}\\)\\s*=>\\s*\\{":"radio.onReceivedNumber(function (receivedNumber) {","radio\\s*\\.\\s*onDataPacketReceived\\(\\s*\\(\\{\\s*receivedString: name, receivedNumber: value\\s*\\}\\)\\s*=>\\s*\\{":"radio.onReceivedValue(function (name, value) {","radio\\s*\\.\\s*onDataPacketReceived\\(\\s*\\(\\{\\s*receivedString\\s*\\}\\)\\s*=>\\s*\\{":"radio.onReceivedString(function (receivedString) {","Math\\s*\\.\\s*random\\s*\\(":"Math.randomRange(0, "}},{"type":"blockId","map":{"device_get_acceleration":"device_acceleration"}},{"type":"blockValue","map":{"device_print_message.message":"text"}}],"0.0.0 - 1.4.12":[{"type":"api","map":{"DisplayMode\\s*\\.\\s*BackAndWhite":"DisplayMode.BlackAndWhite"}}],"0.0.0 - 3.1.10":[{"type":"package","map":{"pxt-microbit-v2-extension":"microphone"}}],"0.0.0 - 3.0.18":[{"type":"missingPackage","map":{".*":"microphone"}}]},"hidSelectors":[{"usagePage":"0xFF00","usageId":"0x0001","vid":"0x0d28","pid":"0x0204"}],"webUSB":true,"useNewFunctions":true,"nativeType":"thumb","switches":{},"jsRefCounting":false,"noSourceInFlash":true},"compileService":{"yottaTarget":"bbc-microbit-classic-gcc@https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc","yottaCorePackage":"microbit","githubCorePackage":"lancaster-university/microbit","gittag":"v2.2.0-rc6","serviceId":"microbit","dockerImage":"pext/yotta:update-yotta3","yottaBinary":"pxt-microbit-app-combined.hex"},"multiVariants":["mbdal","mbcodal"],"alwaysMultiVariant":true,"variants":{"mbdal":{"compile":{},"compileService":{}},"mbcodal":{"compile":{"flashCodeAlign":4096,"flashUsableEnd":487424,"flashEnd":524288},"compileService":{"buildEngine":"codal","codalTarget":{"name":"codal-microbit-v2","url":"https://github.com/lancaster-university/codal-microbit-v2","branch":"v0.2.50","type":"git"},"codalBinary":"MICROBIT","githubCorePackage":"lancaster-university/microbit-v2-samples","gittag":"v0.2.12","serviceId":"mbcodal2","dockerImage":"pext/yotta:update-yotta3","yottaConfigCompatibility":true}}},"runtime":{"mathBlocks":true,"loopsBlocks":true,"logicBlocks":true,"variablesBlocks":true,"textBlocks":true,"listsBlocks":true,"functionBlocks":true,"breakBlock":true,"continueBlock":true,"functionsOptions":{"useNewFunctions":true,"extraFunctionEditorTypes":[{"typeName":"game.LedSprite","label":"LedSprite","icon":"send","defaultName":"sprite"},{"typeName":"Image","label":"Image","icon":"image outline","defaultName":"image"}]},"onStartColor":"#1E90FF","onStartNamespace":"basic","onStartWeight":54},"simulator":{"autoRun":true,"streams":false,"aspectRatio":1.22,"parts":true,"partsAspectRatio":0.69,"messageSimulators":{"jacdac":{"url":"https://microsoft.github.io/jacdac-docs/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","localHostUrl":"http://localhost:8000/tools/makecode-sim?webusb=0&parentOrigin=$PARENT_ORIGIN$","aspectRatio":1.22,"permanent":true}},"boardDefinition":{"visual":"microbit","gpioPinBlocks":[["P0"],["P1"],["P2"],["P3"],["P4","P5","P6","P7"],["P8","P9","P10","P11","P12"],["P16"]],"gpioPinMap":{"P0":"P0","P1":"P1","P2":"P2","P3":"P3","P4":"P4","P5":"P5","P6":"P6","P7":"P7","P8":"P8","P9":"P9","P10":"P10","P11":"P11","P12":"P12","P13":"P13","P14":"P14","P15":"P15","P16":"P16","P19":"P19","P20":"P20"},"spiPins":{"MOSI":"P15","MISO":"P14","SCK":"P13"},"i2cPins":{"SDA":"P20","SCL":"P19"},"analogInPins":["P0","P1","P2","P3","P10"],"groundPins":["GND"],"threeVoltPins":["+3v3"],"attachPowerOnRight":true,"onboardComponents":["accelerometer","buttonpair","ledmatrix","speaker","bluetooth","thermometer","compass","builtinspeaker","microphone","logotouch","flashlog","v2"],"pinStyles":{"P0":"croc","P1":"croc","P2":"croc","GND":"croc","+3v3":"croc"},"marginWhenBreadboarding":[0,0,80,0]}},"serial":{"nameFilter":"^(mbed Serial Port|DAPLink CMSIS-DAP)","log":true,"useEditor":true,"editorTheme":{"graphBackground":"#d9d9d9","lineColors":["#6633cc","#3891A6","#3454D1","#EF767A","#F46197","#107C10"]},"vendorId":"0x0d28","productId":"0x0204","rawHID":true},"queryVariants":{"hidemenu":{"appTheme":{"hideMenuBar":true}},"androidapp":{"compile":{"webUSB":false},"appTheme":{"disableBlobObjectDownload":true}},"clever=1":{"cloud":{"cloudProviders":{"clever":{"id":"clever","name":"Clever","icon":"./static/providers/clever-logo.png","identity":true,"redirect":true,"order":3}}}}},"uploadDocs":true,"versions":{"branch":"v5.1.27","tag":"v5.1.27","commits":"https://github.com/microsoft/pxt-microbit/commits/7fee1727e3bd154b1c00510963b296a064252020","target":"5.1.27","pxt":"8.6.34"},"blocksprj":{"id":"blocksprj","config":{"name":"{0} block","dependencies":{"core":"*","radio":"*","microphone":"*"},"description":"","files":["main.blocks","main.ts","README.md"],"additionalFilePaths":[]},"files":{"README.md":"","main.blocks":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <block type=\"pxt-on-start\"></block>\n <block type=\"device_forever\"></block>\n</xml>","main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"{0} bit","dependencies":{"core":"*","radio":"*","microphone":"*"},"description":"","files":["main.ts","README.md"],"additionalFilePaths":[]},"files":{"README.md":"","main.ts":"basic.showLeds(`\n . . . . .\n . # . # .\n . . . . .\n # . . . #\n . # # # .\n `);"}}}
|
package/built/theme.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"accentColor":"#5C005C","logoUrl":"https://microbit.org/","logo":"@cdnUrl@/blob/d955ce94fc3f7d2c6573300c71a56dc1d92c9bf0/static/logo.portrait.white.svg","docsLogo":"@cdnUrl@/blob/3403510141da69da71b1fbb1024619a3ba88ac29/static/logo.square.white.svg","portraitLogo":"@cdnUrl@/blob/3403510141da69da71b1fbb1024619a3ba88ac29/static/logo.square.white.svg","footerLogo":"@cdnUrl@/blob/642175ae61e6822c948990e15570e590d2e0ecf1/static/logo.portrait.black.svg","cardLogo":"@cdnUrl@/blob/4de54063603c8d16531078818a83f7c29a3588fa/static/icons/apple-touch-icon.png","appLogo":"@cdnUrl@/blob/4de54063603c8d16531078818a83f7c29a3588fa/static/icons/apple-touch-icon.png","organization":"Microsoft MakeCode","organizationUrl":"https://makecode.com/","organizationLogo":"@cdnUrl@/blob/106597ae039a275897661651b96856220c9b0fad/static/Microsoft_logo_rgb_W-white_D-square.png","organizationWideLogo":"@cdnUrl@/blob/d6139e3d0af51f02aa5f8765ecb0985acbd98551/static/Microsoft_logo_rgb_W-white_D.png","homeScreenHero":{"imageUrl":"@cdnUrl@/blob/27137e90637eecca4fffc33c1d9b1ab0d20612d5/static/herogallery/hero-banner.png","name":"Flashing Heart","url":"/projects/flashing-heart","description":"New? Start here!","cardType":"tutorial"},"homeScreenHeroGallery":"/hero-banner","homeUrl":"https://makecode.microbit.org/","embedUrl":"https://makecode.microbit.org/","shareUrl":"https://makecode.microbit.org/","privacyUrl":"https://makecode.com/privacy","termsOfUseUrl":"https://makecode.com/termsofuse","githubUrl":"https://github.com/Microsoft/pxt-microbit","boardName":"micro:bit","boardNickname":"micro:bit","driveDisplayName":"MICROBIT","appStoreID":"1092687276","mobileSafariDownloadProtocol":"microbithex://?data","crowdinProject":"makecode","extendEditor":true,"extendFieldEditors":true,"enableTrace":true,"ignoreDocsErrors":false,"errorList":true,"workspaceSearch":true,"allowPackageExtensions":true,"addNewTypeScriptFile":true,"experiments":["accessibleBlocks","debugExtensionCode","bluetoothUartConsole","bluetoothPartialFlashing","simScreenshot","simGif","identity","blocksErrorList"],"bluetoothUartFilters":[{"namePrefix":"BBC micro:bit"}],"docMenu":[{"name":"Support","path":"https://support.microbit.org/"},{"name":"Reference","path":"/reference"},{"name":"Hardware","path":"/device"},{"name":"Buy","path":"https://microbit.org/resellers"}],"hasReferenceDocs":true,"usbDocs":"/device/usb","hideHomeDetailsVideo":true,"invertedMenu":true,"coloredToolbox":true,"monacoToolbox":true,"hasAudio":true,"socialOptions":{"orgTwitterHandle":"MSMakeCode","hashtags":"MakeCode","discourse":"https://forum.makecode.com/","discourseCategory":"micro:bit"},"blocklyOptions":{"grid":{"spacing":45,"length":7,"colour":"rgba(189, 195, 199, 0.30)","snap":false}},"blockColors":{"logic":"#00A4A6","loops":"#00AA00","math":"#9400D3","variables":"#DC143C","text":"#B8860B","advanced":"#00272B","functions":"#3455DB","arrays":"#E65722"},"blocksCollapsing":true,"highContrast":true,"greenScreen":true,"print":true,"selectLanguage":true,"availableLocales":["en","ar","bg","ca","cs","cy","da","de","el","es-ES","fi","fr","he","hu","is","it","ja","ko","nl","nb","nn-NO","pl","pt-BR","pt-PT","ru","si-LK","sk","sr","sv-SE","tr","uk","zh-CN","zh-TW"],"monacoColors":{"editor.background":"#ecf0f1"},"monacoFieldEditors":["soundeffect-editor"],"browserDbPrefixes":{"1":"v1","2":"v2","3":"v3","4":"v4","5":"v5"},"editorVersionPaths":{"0":"v0"},"showProjectSettings":true,"scriptManager":true,"debugger":true,"simGifTransparent":"rgba(0,0,0,0)","simGifMaxFrames":44,"simScreenshotMaxUriLength":300000,"qrCode":true,"importExtensionFiles":true,"nameProjectFirst":true,"githubEditor":true,"chooseLanguageRestrictionOnNewProject":true,"openProjectNewTab":true,"python":true,"appFlashingTroubleshoot":"/device/windows-app/troubleshoot","immersiveReader":true,"tutorialCodeValidation":true,"downloadDialogTheme":{"webUSBDeviceNames":["BBC micro:bit CMSIS-DAP","DAPLink CMSIS-DAP"],"minimumFirmwareVersion":"0249","deviceIcon":"xicon microbit","deviceSuccessIcon":"xicon microbit-check","downloadMenuHelpURL":"/device/usb","downloadHelpURL":"/device/usb","troubleshootWebUSBHelpURL":"/device/usb/webusb/troubleshoot","incompatibleHardwareHelpURL":"/device/v2","dragFileImage":"@cdnUrl@/blob/4ac41b592008946443c877dfb6704aef96e9fed3/static/download/transfer.png","connectDeviceImage":"@cdnUrl@/blob/531d5c31f85c523c9a72d2da24e0508502e1e965/static/download/connect-microbit.gif","selectDeviceImage":"@cdnUrl@/blob/451a7b7954a02a92be7a0fc65388a486ebf04f43/static/download/pair-browser.png","connectionSuccessImage":"@cdnUrl@/blob/87ce2f19a063cfe3bed227537b92c5ac0e098212/static/download/successfully-paired.png","incompatibleHardwareImage":"@cdnUrl@/blob/1ae40aeeaccad7ecef3eb8905c37eb89635fee09/static/download/incompatible.png"},"winAppDeprImage":"@cdnUrl@/blob/418c9c299ed5dce035443b8b2094fec39f7fb5b1/static/winapp.PNG","showWinAppDeprBanner":false,"tours":{"editor":"/tours/editor-tour"},"tutorialSimSidebarLayout":true,"preferWebUSBDownload":true,"TOC":[{"name":"About","path":"/about","subitems":[]},{"name":"FAQ","path":"/faq","subitems":[]},{"name":"Projects","path":"/projects","subitems":[]},{"name":"GitHub","path":"/github","subitems":[]},{"name":"Support","path":"https://support.microbit.org/","subitems":[]},{"name":"Courses","path":"/courses","subitems":[{"name":"CS Intro","path":"/courses/csintro","subitems":[{"name":"About","path":"/courses/csintro/about","subitems":[]},{"name":"Introduction","path":"/courses/csintro/introduction","subitems":[]},{"name":"References","path":"/courses/csintro/references","subitems":[]},{"name":"Acknowledgements","path":"/courses/csintro/acknowledgements","subitems":[]},{"name":"Making","path":"/courses/csintro/making","subitems":[{"name":"Introduction","path":"/courses/csintro/making/introduction","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/making/unplugged","subitems":[]},{"name":"Walkthrough","path":"/courses/csintro/making/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/making/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/making/standards","subitems":[]}]},{"name":"Algorithms","path":"/courses/csintro/algorithms","subitems":[{"name":"Overview","path":"/courses/csintro/algorithms/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/algorithms/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/algorithms/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/algorithms/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/algorithms/standards","subitems":[]}]},{"name":"Variables","path":"/courses/csintro/variables","subitems":[{"name":"Overview","path":"/courses/csintro/variables/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/variables/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/variables/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/variables/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/variables/standards","subitems":[]}]},{"name":"Conditionals","path":"/courses/csintro/conditionals","subitems":[{"name":"Overview","path":"/courses/csintro/conditionals/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/conditionals/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/conditionals/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/conditionals/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/conditionals/standards","subitems":[]}]},{"name":"Iteration","path":"/courses/csintro/iteration","subitems":[{"name":"Overview","path":"/courses/csintro/iteration/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/iteration/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/iteration/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/iteration/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/iteration/standards","subitems":[]}]},{"name":"Mini-project","path":"/courses/csintro/miniproject","subitems":[{"name":"Review","path":"/courses/csintro/miniproject/review","subitems":[]},{"name":"Activity","path":"/courses/csintro/miniproject/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/miniproject/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/miniproject/standards","subitems":[]}]},{"name":"Coordinates","path":"/courses/csintro/coordinates","subitems":[{"name":"Overview","path":"/courses/csintro/coordinates/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/coordinates/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/coordinates/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/coordinates/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/coordinates/standards","subitems":[]}]},{"name":"Booleans","path":"/courses/csintro/booleans","subitems":[{"name":"Overview","path":"/courses/csintro/booleans/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/booleans/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/booleans/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/booleans/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/booleans/standards","subitems":[]}]},{"name":"Binary","path":"/courses/csintro/binary","subitems":[{"name":"Overview","path":"/courses/csintro/binary/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/binary/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/binary/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/binary/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/binary/standards","subitems":[]}]},{"name":"Radio","path":"/courses/csintro/radio","subitems":[{"name":"Overview","path":"/courses/csintro/radio/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/radio/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/radio/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/radio/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/radio/standards","subitems":[]}]},{"name":"Arrays","path":"/courses/csintro/arrays","subitems":[{"name":"Overview","path":"/courses/csintro/arrays/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/arrays/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/arrays/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/arrays/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/arrays/standards","subitems":[]}]},{"name":"Final Project","path":"/courses/csintro/finalproject","subitems":[{"name":"Review","path":"/courses/csintro/finalproject/review","subitems":[]},{"name":"Project","path":"/courses/csintro/finalproject/project","subitems":[]},{"name":"Examples","path":"/courses/csintro/finalproject/examples","subitems":[]},{"name":"Standards","path":"/courses/csintro/finalproject/standards","subitems":[]}]}]},{"name":"Blocks to JavaScript","path":"/courses/blocks-to-javascript","subitems":[{"name":"Hello JavaScript","path":"/courses/blocks-to-javascript/hello-javascript","subitems":[]},{"name":"Starter Blocks","path":"/courses/blocks-to-javascript/starter-blocks","subitems":[]},{"name":"Writing Code","path":"/courses/blocks-to-javascript/writing-code","subitems":[]},{"name":"Conditional Loops","path":"/courses/blocks-to-javascript/conditional-loops","subitems":[]},{"name":"Writing Functions","path":"/courses/blocks-to-javascript/writing-functions","subitems":[]}]},{"name":"Science experiments","path":"/courses/ucp-science","subitems":[{"name":"Data collection","path":"/courses/ucp-science/data-collection","subitems":[{"name":"Overview","path":"/courses/ucp-science/data-collection/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/data-collection/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/data-collection/resources","subitems":[]}]},{"name":"Population Traits","path":"/courses/ucp-science/population","subitems":[{"name":"Overview","path":"/courses/ucp-science/population/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/population/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/population/resources","subitems":[]}]},{"name":"Temperature","path":"/courses/ucp-science/temperature","subitems":[{"name":"Overview","path":"/courses/ucp-science/temperature/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/temperature/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/temperature/resources","subitems":[]}]},{"name":"Soil Moisture","path":"/courses/ucp-science/soil-moisture","subitems":[{"name":"Overview","path":"/courses/ucp-science/soil-moisture/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/soil-moisture/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/soil-moisture/resources","subitems":[]}]},{"name":"Gravity, Motion and Waves","path":"/courses/ucp-science/gravity","subitems":[{"name":"Overview","path":"/courses/ucp-science/gravity/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/gravity/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/gravity/resources","subitems":[]}]},{"name":"Body Electrical and Waves","path":"/courses/ucp-science/body-electrical","subitems":[{"name":"Overview","path":"/courses/ucp-science/body-electrical/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/body-electrical/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/body-electrical/resources","subitems":[]}]},{"name":"Electricity","path":"/courses/ucp-science/electricity","subitems":[{"name":"Overview","path":"/courses/ucp-science/electricity/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/electricity/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/electricity/resources","subitems":[]}]},{"name":"Rocket Acceleration","path":"/courses/ucp-science/rocket-acceleration","subitems":[{"name":"Overview","path":"/courses/ucp-science/rocket-acceleration/overview","subitems":[]},{"name":"Build","path":"/courses/ucp-science/rocket-acceleration/build","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/rocket-acceleration/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/rocket-acceleration/resources","subitems":[]}]}]},{"name":"Logic Lab","path":"/courses/logic-lab","subitems":[{"name":"Logic and Expressions","path":"/courses/logic-lab/expressions","subitems":[]},{"name":"Boolean Elements","path":"/courses/logic-lab/elements","subitems":[]},{"name":"Logic Explorer","path":"/courses/logic-lab/explorer","subitems":[]},{"name":"Logic Gates","path":"/courses/logic-lab/logic-gates","subitems":[]},{"name":"Programmable Logic","path":"/courses/logic-lab/programmable","subitems":[]}]}]},{"name":"Reference","path":"/reference","subitems":[{"name":"Basic","path":"/reference/basic","subitems":[{"name":"show number","path":"/reference/basic/show-number","subitems":[]},{"name":"show icon","path":"/reference/basic/show-icon","subitems":[]},{"name":"show leds","path":"/reference/basic/show-leds","subitems":[]},{"name":"show string","path":"/reference/basic/show-string","subitems":[]},{"name":"clear screen","path":"/reference/basic/clear-screen","subitems":[]},{"name":"forever","path":"/reference/basic/forever","subitems":[]},{"name":"pause","path":"/reference/basic/pause","subitems":[]},{"name":"show arrow","path":"/reference/basic/show-arrow","subitems":[]}]},{"name":"Input","path":"/reference/input","subitems":[{"name":"on button pressed","path":"/reference/input/on-button-pressed","subitems":[]},{"name":"on gesture","path":"/reference/input/on-gesture","subitems":[]},{"name":"on pin pressed","path":"/reference/input/on-pin-pressed","subitems":[]},{"name":"button is pressed","path":"/reference/input/button-is-pressed","subitems":[]},{"name":"compass heading","path":"/reference/input/compass-heading","subitems":[]},{"name":"pin is pressed","path":"/reference/input/pin-is-pressed","subitems":[]},{"name":"temperature","path":"/reference/input/temperature","subitems":[]},{"name":"acceleration","path":"/reference/input/acceleration","subitems":[]},{"name":"light level","path":"/reference/input/light-level","subitems":[]},{"name":"rotation","path":"/reference/input/rotation","subitems":[]},{"name":"magnetic force","path":"/reference/input/magnetic-force","subitems":[]},{"name":"running time","path":"/reference/input/running-time","subitems":[]},{"name":"set accelerometer range","path":"/reference/input/set-accelerometer-range","subitems":[]}]},{"name":"Music","path":"/reference/music","subitems":[{"name":"play tone","path":"/reference/music/play-tone","subitems":[]},{"name":"ring tone","path":"/reference/music/ring-tone","subitems":[]},{"name":"rest","path":"/reference/music/rest","subitems":[]},{"name":"beat","path":"/reference/music/beat","subitems":[]},{"name":"tempo","path":"/reference/music/tempo","subitems":[]},{"name":"change tempo by","path":"/reference/music/change-tempo-by","subitems":[]},{"name":"set tempo","path":"/reference/music/set-tempo","subitems":[]}]},{"name":"Led","path":"/reference/led","subitems":[{"name":"plot","path":"/reference/led/plot","subitems":[]},{"name":"unplot","path":"/reference/led/unplot","subitems":[]},{"name":"point","path":"/reference/led/point","subitems":[]},{"name":"toggle","path":"/reference/led/toggle","subitems":[]},{"name":"brightness","path":"/reference/led/brightness","subitems":[]},{"name":"set brightness","path":"/reference/led/set-brightness","subitems":[]},{"name":"stop animation","path":"/reference/led/stop-animation","subitems":[]},{"name":"plot bar graph","path":"/reference/led/plot-bar-graph","subitems":[]},{"name":"enable","path":"/reference/led/enable","subitems":[]}]},{"name":"Radio","path":"/reference/radio","subitems":[{"name":"send number","path":"/reference/radio/send-number","subitems":[]},{"name":"send value","path":"/reference/radio/send-value","subitems":[]},{"name":"send string","path":"/reference/radio/send-string","subitems":[]},{"name":"on received number","path":"/reference/radio/on-received-number","subitems":[]},{"name":"on received string","path":"/reference/radio/on-received-string","subitems":[]},{"name":"on received buffer","path":"/reference/radio/on-received-buffer","subitems":[]},{"name":"received packet","path":"/reference/radio/received-packet","subitems":[]},{"name":"set group","path":"/reference/radio/set-group","subitems":[]},{"name":"set transmit power","path":"/reference/radio/set-transmit-power","subitems":[]},{"name":"set transmit serial number","path":"/reference/radio/set-transmit-serial-number","subitems":[]},{"name":"on data packet received","path":"/reference/radio/on-data-packet-received","subitems":[]},{"name":"write received packet to serial","path":"/reference/radio/write-received-packet-to-serial","subitems":[]}]},{"name":"Game","path":"/reference/game","subitems":[{"name":"create sprite","path":"/reference/game/create-sprite","subitems":[]},{"name":"delete","path":"/reference/game/delete","subitems":[]},{"name":"move","path":"/reference/game/move","subitems":[]},{"name":"turn","path":"/reference/game/turn","subitems":[]},{"name":"if on edge bounce","path":"/reference/game/if-on-edge-bounce","subitems":[]},{"name":"get","path":"/reference/game/get","subitems":[]},{"name":"set","path":"/reference/game/set","subitems":[]},{"name":"change","path":"/reference/game/change","subitems":[]},{"name":"is touching","path":"/reference/game/is-touching","subitems":[]},{"name":"is touching edge","path":"/reference/game/is-touching-edge","subitems":[]},{"name":"add score","path":"/reference/game/add-score","subitems":[]},{"name":"score","path":"/reference/game/score","subitems":[]},{"name":"set score","path":"/reference/game/set-score","subitems":[]},{"name":"set life","path":"/reference/game/set-life","subitems":[]},{"name":"add life","path":"/reference/game/add-life","subitems":[]},{"name":"remove life","path":"/reference/game/remove-life","subitems":[]},{"name":"start countdown","path":"/reference/game/start-countdown","subitems":[]},{"name":"game over","path":"/reference/game/game-over","subitems":[]},{"name":"pause","path":"/reference/game/pause","subitems":[]},{"name":"resume","path":"/reference/game/resume","subitems":[]}]},{"name":"Images","path":"/reference/images","subitems":[{"name":"create image","path":"/reference/images/create-image","subitems":[]},{"name":"create big image","path":"/reference/images/create-big-image","subitems":[]},{"name":"show image","path":"/reference/images/show-image","subitems":[]},{"name":"scroll image","path":"/reference/images/scroll-image","subitems":[]},{"name":"arrow image","path":"/reference/images/arrow-image","subitems":[]},{"name":"icon image","path":"/reference/images/icon-image","subitems":[]},{"name":"arrow number","path":"/reference/images/arrow-number","subitems":[]}]},{"name":"Pins","path":"/reference/pins","subitems":[{"name":"digital read pin","path":"/reference/pins/digital-read-pin","subitems":[]},{"name":"digital write pin","path":"/reference/pins/digital-write-pin","subitems":[]},{"name":"analog read pin","path":"/reference/pins/analog-read-pin","subitems":[]},{"name":"analog write pin","path":"/reference/pins/analog-write-pin","subitems":[]},{"name":"analog set period","path":"/reference/pins/analog-set-period","subitems":[]},{"name":"map","path":"/reference/pins/map","subitems":[]},{"name":"on pulsed","path":"/reference/pins/on-pulsed","subitems":[]},{"name":"pulse duration","path":"/reference/pins/pulse-duration","subitems":[]},{"name":"pulse in","path":"/reference/pins/pulse-in","subitems":[]},{"name":"servo write pin","path":"/reference/pins/servo-write-pin","subitems":[]},{"name":"servo set pulse","path":"/reference/pins/servo-set-pulse","subitems":[]},{"name":"i2c read number","path":"/reference/pins/i2c-read-number","subitems":[]},{"name":"i2c write number","path":"/reference/pins/i2c-write-number","subitems":[]},{"name":"set pull","path":"/reference/pins/set-pull","subitems":[]},{"name":"analog pitch","path":"/reference/pins/analog-pitch","subitems":[]},{"name":"analog set pitch pin","path":"/reference/pins/analog-set-pitch-pin","subitems":[]},{"name":"spi write","path":"/reference/pins/spi-write","subitems":[]},{"name":"spi Pins","path":"/reference/pins/spi-pins","subitems":[]},{"name":"spi format","path":"/reference/pins/spi-format","subitems":[]},{"name":"spi frequency","path":"/reference/pins/spi-frequency","subitems":[]}]},{"name":"Serial","path":"/reference/serial","subitems":[{"name":"write line","path":"/reference/serial/write-line","subitems":[]},{"name":"write number","path":"/reference/serial/write-number","subitems":[]},{"name":"write value","path":"/reference/serial/write-value","subitems":[]},{"name":"write string","path":"/reference/serial/write-string","subitems":[]},{"name":"read until","path":"/reference/serial/read-until","subitems":[]},{"name":"read line","path":"/reference/serial/read-line","subitems":[]},{"name":"read string","path":"/reference/serial/read-string","subitems":[]},{"name":"on data received","path":"/reference/serial/on-data-received","subitems":[]},{"name":"redirect","path":"/reference/serial/redirect","subitems":[]},{"name":"redirect to usb","path":"/reference/serial/redirect-to-usb","subitems":[]},{"name":"set baud rate","path":"/reference/serial/set-baud-rate","subitems":[]},{"name":"set write line padding","path":"/reference/serial/set-write-line-padding","subitems":[]},{"name":"write buffer","path":"/reference/serial/write-buffer","subitems":[]},{"name":"read buffer","path":"/reference/serial/read-buffer","subitems":[]}]},{"name":"Control","path":"/reference/control","subitems":[{"name":"in background","path":"/reference/control/in-background","subitems":[]},{"name":"reset","path":"/reference/control/reset","subitems":[]},{"name":"wait micros","path":"/reference/control/wait-micros","subitems":[]},{"name":"on event","path":"/reference/control/on-event","subitems":[]},{"name":"raise event","path":"/reference/control/raise-event","subitems":[]},{"name":"event timestamp","path":"/reference/control/event-timestamp","subitems":[]},{"name":"event value","path":"/reference/control/event-value","subitems":[]}]},{"name":"Bluetooth","path":"/reference/bluetooth","subitems":[{"name":"About","path":"/reference/bluetooth/about-bluetooth","subitems":[]},{"name":"Pairing","path":"/reference/bluetooth/bluetooth-pairing","subitems":[]},{"name":"on bluetooth connected","path":"/reference/bluetooth/on-bluetooth-connected","subitems":[]},{"name":"on bluetooth disconnected","path":"/reference/bluetooth/on-bluetooth-disconnected","subitems":[]},{"name":"start accelerometer service","path":"/reference/bluetooth/start-accelerometer-service","subitems":[]},{"name":"start button service","path":"/reference/bluetooth/start-button-service","subitems":[]},{"name":"start io pin service","path":"/reference/bluetooth/start-io-pin-service","subitems":[]},{"name":"start led service","path":"/reference/bluetooth/start-led-service","subitems":[]},{"name":"start magnetometer service","path":"/reference/bluetooth/start-magnetometer-service","subitems":[]},{"name":"start temperature service","path":"/reference/bluetooth/start-temperature-service","subitems":[]},{"name":"start uart service","path":"/reference/bluetooth/start-uart-service","subitems":[]},{"name":"uart read until","path":"/reference/bluetooth/uart-read-until","subitems":[]},{"name":"uart write string","path":"/reference/bluetooth/uart-write-string","subitems":[]},{"name":"uart write number","path":"/reference/bluetooth/uart-write-number","subitems":[]},{"name":"uart write value","path":"/reference/bluetooth/uart-write-value","subitems":[]},{"name":"advertise url","path":"/reference/bluetooth/advertise-url","subitems":[]},{"name":"stop advertising","path":"/reference/bluetooth/stop-advertising","subitems":[]},{"name":"advertise uid","path":"/reference/bluetooth/advertise-uid","subitems":[]},{"name":"advertise-uid-buffer","path":"/reference/bluetooth/advertise-uid-buffer","subitems":[]}]}]},{"name":"Extensions","path":"/extensions","subitems":[]},{"name":"Blocks","path":"/blocks","subitems":[{"name":"On Start","path":"/blocks/on-start","subitems":[]},{"name":"Loops","path":"/blocks/loops","subitems":[{"name":"repeat","path":"/blocks/loops/repeat","subitems":[]},{"name":"for","path":"/blocks/loops/for","subitems":[]},{"name":"while","path":"/blocks/loops/while","subitems":[]},{"name":"for of","path":"/blocks/loops/for-of","subitems":[]}]},{"name":"Logic","path":"/blocks/logic","subitems":[{"name":"if","path":"/blocks/logic/if","subitems":[]},{"name":"Boolean","path":"/blocks/logic/boolean","subitems":[]}]},{"name":"Variables","path":"/blocks/variables","subitems":[{"name":"assign","path":"/blocks/variables/assign","subitems":[]},{"name":"change var","path":"/blocks/variables/change","subitems":[]},{"name":"var","path":"/blocks/variables/var","subitems":[]}]},{"name":"Math","path":"/blocks/math","subitems":[]},{"name":"JavaScript blocks","path":"/blocks/javascript-blocks","subitems":[]},{"name":"Custom blocks","path":"/blocks/custom","subitems":[]}]},{"name":"Python","path":"/python","subitems":[{"name":"Calling","path":"/python/call","subitems":[]},{"name":"Sequencing","path":"/python/sequence","subitems":[]},{"name":"Variables","path":"/python/variables","subitems":[]},{"name":"Operators","path":"/python/operators","subitems":[]},{"name":"Statements","path":"/python/statements","subitems":[]},{"name":"Functions","path":"/python/functions","subitems":[]},{"name":"Classes","path":"/python/classes","subitems":[]}]},{"name":"JavaScript","path":"/javascript","subitems":[{"name":"Calling","path":"/javascript/call","subitems":[]},{"name":"Sequencing","path":"/javascript/sequence","subitems":[]},{"name":"Variables","path":"/javascript/variables","subitems":[]},{"name":"Operators","path":"/javascript/operators","subitems":[]},{"name":"Statements","path":"/javascript/statements","subitems":[]},{"name":"Functions","path":"/javascript/functions","subitems":[]},{"name":"Types","path":"/javascript/types","subitems":[]},{"name":"Classes","path":"/javascript/classes","subitems":[]},{"name":"Interfaces","path":"/javascript/interfaces","subitems":[]},{"name":"Generics","path":"/javascript/generics","subitems":[]}]},{"name":"Types","path":"/types","subitems":[{"name":"Number","path":"/types/number","subitems":[]},{"name":"String","path":"/types/string","subitems":[]},{"name":"Boolean","path":"/types/boolean","subitems":[]},{"name":"Array","path":"/types/array","subitems":[]},{"name":"Function","path":"/types/function","subitems":[]},{"name":"Buffer","path":"/types/buffer","subitems":[{"name":"Using buffers","path":"/types/buffer/using-buffers","subitems":[]},{"name":"Number format","path":"/types/buffer/number-format","subitems":[]}]}]},{"name":"Hardware","path":"/device","subitems":[{"name":"Data Analysis","path":"/device/data-analysis","subitems":[{"name":"Plotting with LEDs","path":"/device/data-analysis/led-plotting","subitems":[]},{"name":"Viewing Data","path":"/device/data-analysis/viewing","subitems":[]},{"name":"Writing Data","path":"/device/data-analysis/writing","subitems":[]},{"name":"Generating Data","path":"/device/data-analysis/generating","subitems":[]},{"name":"Analyzing Data","path":"/device/data-analysis/analyze","subitems":[]},{"name":"Remote Data","path":"/device/data-analysis/remote","subitems":[]}]},{"name":"Error codes","path":"/device/error-codes","subitems":[]},{"name":"Foil circuits","path":"/device/foil-circuits","subitems":[]},{"name":"Incompatible Hardware","path":"/device/incompatible","subitems":[]},{"name":"MES events","path":"/device/mes-events","subitems":[]},{"name":"Pins","path":"/device/pins","subitems":[]},{"name":"Reactive","path":"/device/reactive","subitems":[]},{"name":"Screen","path":"/device/screen","subitems":[]},{"name":"Serial","path":"/device/serial","subitems":[]},{"name":"Servo","path":"/device/servo","subitems":[]},{"name":"Simulator","path":"/device/simulator","subitems":[]},{"name":"USB","path":"/device/usb","subitems":[]},{"name":"WebUSB","path":"/device/usb/webusb","subitems":[{"name":"WebUSB Troubleshoot","path":"/device/usb/webusb/troubleshoot","subitems":[]}]},{"name":"Flashing via HID (CMSIS-DAP)","path":"/hidflash","subitems":[]}]},{"name":"Blocks Gallery","path":"/block-gallery","subitems":[]},{"name":"Miscellaneous","path":"","subitems":[{"name":"About","path":"/about","subitems":[]},{"name":"Support","path":"/support","subitems":[]},{"name":"Translate","path":"/translate","subitems":[]},{"name":"Sharing projects","path":"/share","subitems":[]},{"name":"Offline support","path":"/offline","subitems":[]},{"name":"Save","path":"/save","subitems":[]}]},{"name":"Developers","path":"","subitems":[{"name":"Command Line Interface","path":"/cli","subitems":[]},{"name":"Visual Studio Code support","path":"/code","subitems":[]},{"name":"Blocks Embed","path":"/blocks-embed","subitems":[]}]},{"name":"Projects","path":"/projects","subitems":[{"name":"Flashing Heart","path":"/projects/flashing-heart","subitems":[]},{"name":"Smiley Buttons","path":"/projects/smiley-buttons","subitems":[]},{"name":"Love Meter","path":"/projects/love-meter","subitems":[]},{"name":"Rock Paper Scissors","path":"/projects/rock-paper-scissors","subitems":[]},{"name":"Magic Button Trick","path":"/projects/magic-button-trick","subitems":[]},{"name":"Coin Flipper","path":"/projects/coin-flipper","subitems":[]},{"name":"Salute!","path":"/projects/salute","subitems":[]},{"name":"Hack Your Headphones","path":"/projects/hack-your-headphones","subitems":[]},{"name":"Banana Keyboard","path":"/projects/banana-keyboard","subitems":[]},{"name":"Guitar","path":"/projects/guitar","subitems":[]},{"name":"Duct Tape Wallet","path":"/projects/wallet","subitems":[]},{"name":"Watch","path":"/projects/watch","subitems":[]},{"name":"Soil Moisture","path":"/projects/soil-moisture","subitems":[]},{"name":"Plant Watering","path":"/projects/plant-watering","subitems":[]},{"name":"Reaction Time","path":"/projects/reaction-time","subitems":[]},{"name":"States of Matter","path":"/projects/states-of-matter","subitems":[]},{"name":"Mood Radio","path":"/projects/mood-radio","subitems":[]},{"name":"Tele-Potato","path":"/projects/tele-potato","subitems":[]},{"name":"Hot or Cold","path":"/projects/hot-or-cold","subitems":[]},{"name":"Voting Machine","path":"/projects/voting-machine","subitems":[]},{"name":"Infection","path":"/projects/infection","subitems":[]},{"name":"Fireflies","path":"/projects/fireflies","subitems":[]},{"name":"Rock Paper Scissors Teams","path":"/projects/rps-teams","subitems":[]},{"name":"Inchworm","path":"/projects/inchworm","subitems":[]},{"name":"Milk Carton Robot","path":"/projects/milk-carton-robot","subitems":[]},{"name":"Milk Monster","path":"/projects/milky-monster","subitems":[]},{"name":"RC Car","path":"/projects/rc-car","subitems":[]},{"name":"Timing Gates","path":"/projects/timing-gates","subitems":[]},{"name":"Compass","path":"/projects/compass","subitems":[]},{"name":"Telegraph","path":"/projects/telegraph","subitems":[]},{"name":"Railway Crossing","path":"/projects/railway-crossing","subitems":[]},{"name":"Karel","path":"/projects/karel","subitems":[]},{"name":"Stopwatch","path":"/projects/stopwatch","subitems":[]},{"name":"Name Tag","path":"/projects/name-tag","subitems":[]},{"name":"Step counter","path":"/projects/step-counter","subitems":[]},{"name":"Servo calibrator","path":"/projects/servo-calibrator","subitems":[]},{"name":"Analog Pin Tester","path":"/projects/analog-pin-tester","subitems":[]},{"name":"Light Level Meter","path":"/projects/light-level-meter","subitems":[]},{"name":"Radio bridge","path":"/projects/radio-bridge","subitems":[]},{"name":"Snap the dot","path":"/projects/snap-the-dot","subitems":[]},{"name":"Red light green light","path":"/projects/red-light-green-light","subitems":[]},{"name":"Name Badge","path":"/projects/name-badge","subitems":[]}]}],"id":"microbit","title":"Microsoft MakeCode for micro:bit","name":"makecode.microbit.org","description":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","htmlDocIncludes":{}}
|
|
1
|
+
{"accentColor":"#5C005C","logoUrl":"https://microbit.org/","logo":"@cdnUrl@/blob/d955ce94fc3f7d2c6573300c71a56dc1d92c9bf0/static/logo.portrait.white.svg","docsLogo":"@cdnUrl@/blob/3403510141da69da71b1fbb1024619a3ba88ac29/static/logo.square.white.svg","portraitLogo":"@cdnUrl@/blob/3403510141da69da71b1fbb1024619a3ba88ac29/static/logo.square.white.svg","footerLogo":"@cdnUrl@/blob/642175ae61e6822c948990e15570e590d2e0ecf1/static/logo.portrait.black.svg","cardLogo":"@cdnUrl@/blob/4de54063603c8d16531078818a83f7c29a3588fa/static/icons/apple-touch-icon.png","appLogo":"@cdnUrl@/blob/4de54063603c8d16531078818a83f7c29a3588fa/static/icons/apple-touch-icon.png","organization":"Microsoft MakeCode","organizationUrl":"https://makecode.com/","organizationLogo":"@cdnUrl@/blob/106597ae039a275897661651b96856220c9b0fad/static/Microsoft_logo_rgb_W-white_D-square.png","organizationWideLogo":"@cdnUrl@/blob/d6139e3d0af51f02aa5f8765ecb0985acbd98551/static/Microsoft_logo_rgb_W-white_D.png","homeScreenHero":{"imageUrl":"@cdnUrl@/blob/27137e90637eecca4fffc33c1d9b1ab0d20612d5/static/herogallery/hero-banner.png","name":"Flashing Heart","url":"/projects/flashing-heart","description":"New? Start here!","cardType":"tutorial"},"homeScreenHeroGallery":"/hero-banner","homeUrl":"https://makecode.microbit.org/","embedUrl":"https://makecode.microbit.org/","shareUrl":"https://makecode.microbit.org/","privacyUrl":"https://makecode.com/privacy","termsOfUseUrl":"https://makecode.com/termsofuse","githubUrl":"https://github.com/Microsoft/pxt-microbit","boardName":"micro:bit","boardNickname":"micro:bit","driveDisplayName":"MICROBIT","appStoreID":"1092687276","mobileSafariDownloadProtocol":"microbithex://?data","crowdinProject":"makecode","extendEditor":true,"extendFieldEditors":true,"enableTrace":true,"ignoreDocsErrors":false,"errorList":true,"workspaceSearch":true,"allowPackageExtensions":true,"addNewTypeScriptFile":true,"experiments":["accessibleBlocks","debugExtensionCode","bluetoothUartConsole","bluetoothPartialFlashing","identity","blocksErrorList"],"bluetoothUartFilters":[{"namePrefix":"BBC micro:bit"}],"docMenu":[{"name":"Support","path":"https://support.microbit.org/"},{"name":"Reference","path":"/reference"},{"name":"Hardware","path":"/device"},{"name":"Buy","path":"https://microbit.org/resellers"}],"hasReferenceDocs":true,"usbDocs":"/device/usb","hideHomeDetailsVideo":true,"invertedMenu":true,"coloredToolbox":true,"monacoToolbox":true,"hasAudio":true,"socialOptions":{"orgTwitterHandle":"MSMakeCode","hashtags":"MakeCode","discourse":"https://forum.makecode.com/","discourseCategory":"micro:bit"},"blocklyOptions":{"grid":{"spacing":45,"length":7,"colour":"rgba(189, 195, 199, 0.30)","snap":false}},"blockColors":{"logic":"#00A4A6","loops":"#00AA00","math":"#9400D3","variables":"#DC143C","text":"#B8860B","advanced":"#00272B","functions":"#3455DB","arrays":"#E65722"},"blocksCollapsing":true,"highContrast":true,"greenScreen":true,"print":true,"selectLanguage":true,"availableLocales":["en","ar","bg","ca","cs","cy","da","de","el","es-ES","fi","fr","he","hu","is","it","ja","ko","nl","nb","nn-NO","pl","pt-BR","pt-PT","ru","si-LK","sk","sr","sv-SE","tr","uk","zh-CN","zh-TW"],"monacoColors":{"editor.background":"#ecf0f1"},"monacoFieldEditors":["soundeffect-editor"],"browserDbPrefixes":{"1":"v1","2":"v2","3":"v3","4":"v4","5":"v5"},"editorVersionPaths":{"0":"v0"},"showProjectSettings":true,"scriptManager":true,"debugger":true,"simGifTransparent":"rgba(0,0,0,0)","simGifMaxFrames":44,"simScreenshot":true,"simScreenshotMaxUriLength":300000,"simGif":true,"qrCode":true,"importExtensionFiles":true,"nameProjectFirst":true,"githubEditor":true,"chooseLanguageRestrictionOnNewProject":true,"openProjectNewTab":true,"python":true,"appFlashingTroubleshoot":"/device/windows-app/troubleshoot","immersiveReader":true,"tutorialCodeValidation":true,"downloadDialogTheme":{"webUSBDeviceNames":["BBC micro:bit CMSIS-DAP","DAPLink CMSIS-DAP"],"minimumFirmwareVersion":"0249","deviceIcon":"xicon microbit","deviceSuccessIcon":"xicon microbit-check","downloadMenuHelpURL":"/device/usb","downloadHelpURL":"/device/usb","troubleshootWebUSBHelpURL":"/device/usb/webusb/troubleshoot","incompatibleHardwareHelpURL":"/device/v2","dragFileImage":"@cdnUrl@/blob/4ac41b592008946443c877dfb6704aef96e9fed3/static/download/transfer.png","connectDeviceImage":"@cdnUrl@/blob/531d5c31f85c523c9a72d2da24e0508502e1e965/static/download/connect-microbit.gif","selectDeviceImage":"@cdnUrl@/blob/451a7b7954a02a92be7a0fc65388a486ebf04f43/static/download/pair-browser.png","connectionSuccessImage":"@cdnUrl@/blob/87ce2f19a063cfe3bed227537b92c5ac0e098212/static/download/successfully-paired.png","incompatibleHardwareImage":"@cdnUrl@/blob/1ae40aeeaccad7ecef3eb8905c37eb89635fee09/static/download/incompatible.png"},"winAppDeprImage":"@cdnUrl@/blob/418c9c299ed5dce035443b8b2094fec39f7fb5b1/static/winapp.PNG","showWinAppDeprBanner":false,"tours":{"editor":"/tours/editor-tour"},"tutorialSimSidebarLayout":true,"preferWebUSBDownload":true,"TOC":[{"name":"About","path":"/about","subitems":[]},{"name":"FAQ","path":"/faq","subitems":[]},{"name":"Projects","path":"/projects","subitems":[]},{"name":"GitHub","path":"/github","subitems":[]},{"name":"Support","path":"https://support.microbit.org/","subitems":[]},{"name":"Courses","path":"/courses","subitems":[{"name":"CS Intro","path":"/courses/csintro","subitems":[{"name":"About","path":"/courses/csintro/about","subitems":[]},{"name":"Introduction","path":"/courses/csintro/introduction","subitems":[]},{"name":"References","path":"/courses/csintro/references","subitems":[]},{"name":"Acknowledgements","path":"/courses/csintro/acknowledgements","subitems":[]},{"name":"Making","path":"/courses/csintro/making","subitems":[{"name":"Introduction","path":"/courses/csintro/making/introduction","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/making/unplugged","subitems":[]},{"name":"Walkthrough","path":"/courses/csintro/making/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/making/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/making/standards","subitems":[]}]},{"name":"Algorithms","path":"/courses/csintro/algorithms","subitems":[{"name":"Overview","path":"/courses/csintro/algorithms/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/algorithms/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/algorithms/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/algorithms/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/algorithms/standards","subitems":[]}]},{"name":"Variables","path":"/courses/csintro/variables","subitems":[{"name":"Overview","path":"/courses/csintro/variables/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/variables/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/variables/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/variables/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/variables/standards","subitems":[]}]},{"name":"Conditionals","path":"/courses/csintro/conditionals","subitems":[{"name":"Overview","path":"/courses/csintro/conditionals/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/conditionals/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/conditionals/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/conditionals/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/conditionals/standards","subitems":[]}]},{"name":"Iteration","path":"/courses/csintro/iteration","subitems":[{"name":"Overview","path":"/courses/csintro/iteration/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/iteration/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/iteration/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/iteration/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/iteration/standards","subitems":[]}]},{"name":"Mini-project","path":"/courses/csintro/miniproject","subitems":[{"name":"Review","path":"/courses/csintro/miniproject/review","subitems":[]},{"name":"Activity","path":"/courses/csintro/miniproject/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/miniproject/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/miniproject/standards","subitems":[]}]},{"name":"Coordinates","path":"/courses/csintro/coordinates","subitems":[{"name":"Overview","path":"/courses/csintro/coordinates/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/coordinates/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/coordinates/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/coordinates/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/coordinates/standards","subitems":[]}]},{"name":"Booleans","path":"/courses/csintro/booleans","subitems":[{"name":"Overview","path":"/courses/csintro/booleans/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/booleans/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/booleans/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/booleans/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/booleans/standards","subitems":[]}]},{"name":"Binary","path":"/courses/csintro/binary","subitems":[{"name":"Overview","path":"/courses/csintro/binary/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/binary/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/binary/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/binary/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/binary/standards","subitems":[]}]},{"name":"Radio","path":"/courses/csintro/radio","subitems":[{"name":"Overview","path":"/courses/csintro/radio/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/radio/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/radio/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/radio/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/radio/standards","subitems":[]}]},{"name":"Arrays","path":"/courses/csintro/arrays","subitems":[{"name":"Overview","path":"/courses/csintro/arrays/overview","subitems":[]},{"name":"Unplugged","path":"/courses/csintro/arrays/unplugged","subitems":[]},{"name":"Activity","path":"/courses/csintro/arrays/activity","subitems":[]},{"name":"Project","path":"/courses/csintro/arrays/project","subitems":[]},{"name":"Standards","path":"/courses/csintro/arrays/standards","subitems":[]}]},{"name":"Final Project","path":"/courses/csintro/finalproject","subitems":[{"name":"Review","path":"/courses/csintro/finalproject/review","subitems":[]},{"name":"Project","path":"/courses/csintro/finalproject/project","subitems":[]},{"name":"Examples","path":"/courses/csintro/finalproject/examples","subitems":[]},{"name":"Standards","path":"/courses/csintro/finalproject/standards","subitems":[]}]}]},{"name":"Blocks to JavaScript","path":"/courses/blocks-to-javascript","subitems":[{"name":"Hello JavaScript","path":"/courses/blocks-to-javascript/hello-javascript","subitems":[]},{"name":"Starter Blocks","path":"/courses/blocks-to-javascript/starter-blocks","subitems":[]},{"name":"Writing Code","path":"/courses/blocks-to-javascript/writing-code","subitems":[]},{"name":"Conditional Loops","path":"/courses/blocks-to-javascript/conditional-loops","subitems":[]},{"name":"Writing Functions","path":"/courses/blocks-to-javascript/writing-functions","subitems":[]}]},{"name":"Science experiments","path":"/courses/ucp-science","subitems":[{"name":"Data collection","path":"/courses/ucp-science/data-collection","subitems":[{"name":"Overview","path":"/courses/ucp-science/data-collection/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/data-collection/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/data-collection/resources","subitems":[]}]},{"name":"Population Traits","path":"/courses/ucp-science/population","subitems":[{"name":"Overview","path":"/courses/ucp-science/population/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/population/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/population/resources","subitems":[]}]},{"name":"Temperature","path":"/courses/ucp-science/temperature","subitems":[{"name":"Overview","path":"/courses/ucp-science/temperature/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/temperature/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/temperature/resources","subitems":[]}]},{"name":"Soil Moisture","path":"/courses/ucp-science/soil-moisture","subitems":[{"name":"Overview","path":"/courses/ucp-science/soil-moisture/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/soil-moisture/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/soil-moisture/resources","subitems":[]}]},{"name":"Gravity, Motion and Waves","path":"/courses/ucp-science/gravity","subitems":[{"name":"Overview","path":"/courses/ucp-science/gravity/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/gravity/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/gravity/resources","subitems":[]}]},{"name":"Body Electrical and Waves","path":"/courses/ucp-science/body-electrical","subitems":[{"name":"Overview","path":"/courses/ucp-science/body-electrical/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/body-electrical/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/body-electrical/resources","subitems":[]}]},{"name":"Electricity","path":"/courses/ucp-science/electricity","subitems":[{"name":"Overview","path":"/courses/ucp-science/electricity/overview","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/electricity/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/electricity/resources","subitems":[]}]},{"name":"Rocket Acceleration","path":"/courses/ucp-science/rocket-acceleration","subitems":[{"name":"Overview","path":"/courses/ucp-science/rocket-acceleration/overview","subitems":[]},{"name":"Build","path":"/courses/ucp-science/rocket-acceleration/build","subitems":[]},{"name":"Setup and procedure","path":"/courses/ucp-science/rocket-acceleration/setup-procedure","subitems":[]},{"name":"Resources","path":"/courses/ucp-science/rocket-acceleration/resources","subitems":[]}]}]},{"name":"Logic Lab","path":"/courses/logic-lab","subitems":[{"name":"Logic and Expressions","path":"/courses/logic-lab/expressions","subitems":[]},{"name":"Boolean Elements","path":"/courses/logic-lab/elements","subitems":[]},{"name":"Logic Explorer","path":"/courses/logic-lab/explorer","subitems":[]},{"name":"Logic Gates","path":"/courses/logic-lab/logic-gates","subitems":[]},{"name":"Programmable Logic","path":"/courses/logic-lab/programmable","subitems":[]}]}]},{"name":"Reference","path":"/reference","subitems":[{"name":"Basic","path":"/reference/basic","subitems":[{"name":"show number","path":"/reference/basic/show-number","subitems":[]},{"name":"show icon","path":"/reference/basic/show-icon","subitems":[]},{"name":"show leds","path":"/reference/basic/show-leds","subitems":[]},{"name":"show string","path":"/reference/basic/show-string","subitems":[]},{"name":"clear screen","path":"/reference/basic/clear-screen","subitems":[]},{"name":"forever","path":"/reference/basic/forever","subitems":[]},{"name":"pause","path":"/reference/basic/pause","subitems":[]},{"name":"show arrow","path":"/reference/basic/show-arrow","subitems":[]}]},{"name":"Input","path":"/reference/input","subitems":[{"name":"on button pressed","path":"/reference/input/on-button-pressed","subitems":[]},{"name":"on gesture","path":"/reference/input/on-gesture","subitems":[]},{"name":"on pin pressed","path":"/reference/input/on-pin-pressed","subitems":[]},{"name":"button is pressed","path":"/reference/input/button-is-pressed","subitems":[]},{"name":"compass heading","path":"/reference/input/compass-heading","subitems":[]},{"name":"pin is pressed","path":"/reference/input/pin-is-pressed","subitems":[]},{"name":"temperature","path":"/reference/input/temperature","subitems":[]},{"name":"acceleration","path":"/reference/input/acceleration","subitems":[]},{"name":"light level","path":"/reference/input/light-level","subitems":[]},{"name":"rotation","path":"/reference/input/rotation","subitems":[]},{"name":"magnetic force","path":"/reference/input/magnetic-force","subitems":[]},{"name":"running time","path":"/reference/input/running-time","subitems":[]},{"name":"set accelerometer range","path":"/reference/input/set-accelerometer-range","subitems":[]}]},{"name":"Music","path":"/reference/music","subitems":[{"name":"play tone","path":"/reference/music/play-tone","subitems":[]},{"name":"ring tone","path":"/reference/music/ring-tone","subitems":[]},{"name":"rest","path":"/reference/music/rest","subitems":[]},{"name":"beat","path":"/reference/music/beat","subitems":[]},{"name":"tempo","path":"/reference/music/tempo","subitems":[]},{"name":"change tempo by","path":"/reference/music/change-tempo-by","subitems":[]},{"name":"set tempo","path":"/reference/music/set-tempo","subitems":[]}]},{"name":"Led","path":"/reference/led","subitems":[{"name":"plot","path":"/reference/led/plot","subitems":[]},{"name":"unplot","path":"/reference/led/unplot","subitems":[]},{"name":"point","path":"/reference/led/point","subitems":[]},{"name":"toggle","path":"/reference/led/toggle","subitems":[]},{"name":"brightness","path":"/reference/led/brightness","subitems":[]},{"name":"set brightness","path":"/reference/led/set-brightness","subitems":[]},{"name":"stop animation","path":"/reference/led/stop-animation","subitems":[]},{"name":"plot bar graph","path":"/reference/led/plot-bar-graph","subitems":[]},{"name":"enable","path":"/reference/led/enable","subitems":[]}]},{"name":"Radio","path":"/reference/radio","subitems":[{"name":"send number","path":"/reference/radio/send-number","subitems":[]},{"name":"send value","path":"/reference/radio/send-value","subitems":[]},{"name":"send string","path":"/reference/radio/send-string","subitems":[]},{"name":"on received number","path":"/reference/radio/on-received-number","subitems":[]},{"name":"on received string","path":"/reference/radio/on-received-string","subitems":[]},{"name":"on received buffer","path":"/reference/radio/on-received-buffer","subitems":[]},{"name":"received packet","path":"/reference/radio/received-packet","subitems":[]},{"name":"set group","path":"/reference/radio/set-group","subitems":[]},{"name":"set transmit power","path":"/reference/radio/set-transmit-power","subitems":[]},{"name":"set transmit serial number","path":"/reference/radio/set-transmit-serial-number","subitems":[]},{"name":"on data packet received","path":"/reference/radio/on-data-packet-received","subitems":[]},{"name":"write received packet to serial","path":"/reference/radio/write-received-packet-to-serial","subitems":[]}]},{"name":"Game","path":"/reference/game","subitems":[{"name":"create sprite","path":"/reference/game/create-sprite","subitems":[]},{"name":"delete","path":"/reference/game/delete","subitems":[]},{"name":"move","path":"/reference/game/move","subitems":[]},{"name":"turn","path":"/reference/game/turn","subitems":[]},{"name":"if on edge bounce","path":"/reference/game/if-on-edge-bounce","subitems":[]},{"name":"get","path":"/reference/game/get","subitems":[]},{"name":"set","path":"/reference/game/set","subitems":[]},{"name":"change","path":"/reference/game/change","subitems":[]},{"name":"is touching","path":"/reference/game/is-touching","subitems":[]},{"name":"is touching edge","path":"/reference/game/is-touching-edge","subitems":[]},{"name":"add score","path":"/reference/game/add-score","subitems":[]},{"name":"score","path":"/reference/game/score","subitems":[]},{"name":"set score","path":"/reference/game/set-score","subitems":[]},{"name":"set life","path":"/reference/game/set-life","subitems":[]},{"name":"add life","path":"/reference/game/add-life","subitems":[]},{"name":"remove life","path":"/reference/game/remove-life","subitems":[]},{"name":"start countdown","path":"/reference/game/start-countdown","subitems":[]},{"name":"game over","path":"/reference/game/game-over","subitems":[]},{"name":"pause","path":"/reference/game/pause","subitems":[]},{"name":"resume","path":"/reference/game/resume","subitems":[]}]},{"name":"Images","path":"/reference/images","subitems":[{"name":"create image","path":"/reference/images/create-image","subitems":[]},{"name":"create big image","path":"/reference/images/create-big-image","subitems":[]},{"name":"show image","path":"/reference/images/show-image","subitems":[]},{"name":"scroll image","path":"/reference/images/scroll-image","subitems":[]},{"name":"arrow image","path":"/reference/images/arrow-image","subitems":[]},{"name":"icon image","path":"/reference/images/icon-image","subitems":[]},{"name":"arrow number","path":"/reference/images/arrow-number","subitems":[]}]},{"name":"Pins","path":"/reference/pins","subitems":[{"name":"digital read pin","path":"/reference/pins/digital-read-pin","subitems":[]},{"name":"digital write pin","path":"/reference/pins/digital-write-pin","subitems":[]},{"name":"analog read pin","path":"/reference/pins/analog-read-pin","subitems":[]},{"name":"analog write pin","path":"/reference/pins/analog-write-pin","subitems":[]},{"name":"analog set period","path":"/reference/pins/analog-set-period","subitems":[]},{"name":"map","path":"/reference/pins/map","subitems":[]},{"name":"on pulsed","path":"/reference/pins/on-pulsed","subitems":[]},{"name":"pulse duration","path":"/reference/pins/pulse-duration","subitems":[]},{"name":"pulse in","path":"/reference/pins/pulse-in","subitems":[]},{"name":"servo write pin","path":"/reference/pins/servo-write-pin","subitems":[]},{"name":"servo set pulse","path":"/reference/pins/servo-set-pulse","subitems":[]},{"name":"i2c read number","path":"/reference/pins/i2c-read-number","subitems":[]},{"name":"i2c write number","path":"/reference/pins/i2c-write-number","subitems":[]},{"name":"set pull","path":"/reference/pins/set-pull","subitems":[]},{"name":"analog pitch","path":"/reference/pins/analog-pitch","subitems":[]},{"name":"analog set pitch pin","path":"/reference/pins/analog-set-pitch-pin","subitems":[]},{"name":"spi write","path":"/reference/pins/spi-write","subitems":[]},{"name":"spi Pins","path":"/reference/pins/spi-pins","subitems":[]},{"name":"spi format","path":"/reference/pins/spi-format","subitems":[]},{"name":"spi frequency","path":"/reference/pins/spi-frequency","subitems":[]}]},{"name":"Serial","path":"/reference/serial","subitems":[{"name":"write line","path":"/reference/serial/write-line","subitems":[]},{"name":"write number","path":"/reference/serial/write-number","subitems":[]},{"name":"write value","path":"/reference/serial/write-value","subitems":[]},{"name":"write string","path":"/reference/serial/write-string","subitems":[]},{"name":"read until","path":"/reference/serial/read-until","subitems":[]},{"name":"read line","path":"/reference/serial/read-line","subitems":[]},{"name":"read string","path":"/reference/serial/read-string","subitems":[]},{"name":"on data received","path":"/reference/serial/on-data-received","subitems":[]},{"name":"redirect","path":"/reference/serial/redirect","subitems":[]},{"name":"redirect to usb","path":"/reference/serial/redirect-to-usb","subitems":[]},{"name":"set baud rate","path":"/reference/serial/set-baud-rate","subitems":[]},{"name":"set write line padding","path":"/reference/serial/set-write-line-padding","subitems":[]},{"name":"write buffer","path":"/reference/serial/write-buffer","subitems":[]},{"name":"read buffer","path":"/reference/serial/read-buffer","subitems":[]}]},{"name":"Control","path":"/reference/control","subitems":[{"name":"in background","path":"/reference/control/in-background","subitems":[]},{"name":"reset","path":"/reference/control/reset","subitems":[]},{"name":"wait micros","path":"/reference/control/wait-micros","subitems":[]},{"name":"on event","path":"/reference/control/on-event","subitems":[]},{"name":"raise event","path":"/reference/control/raise-event","subitems":[]},{"name":"event timestamp","path":"/reference/control/event-timestamp","subitems":[]},{"name":"event value","path":"/reference/control/event-value","subitems":[]}]},{"name":"Bluetooth","path":"/reference/bluetooth","subitems":[{"name":"About","path":"/reference/bluetooth/about-bluetooth","subitems":[]},{"name":"Pairing","path":"/reference/bluetooth/bluetooth-pairing","subitems":[]},{"name":"on bluetooth connected","path":"/reference/bluetooth/on-bluetooth-connected","subitems":[]},{"name":"on bluetooth disconnected","path":"/reference/bluetooth/on-bluetooth-disconnected","subitems":[]},{"name":"start accelerometer service","path":"/reference/bluetooth/start-accelerometer-service","subitems":[]},{"name":"start button service","path":"/reference/bluetooth/start-button-service","subitems":[]},{"name":"start io pin service","path":"/reference/bluetooth/start-io-pin-service","subitems":[]},{"name":"start led service","path":"/reference/bluetooth/start-led-service","subitems":[]},{"name":"start magnetometer service","path":"/reference/bluetooth/start-magnetometer-service","subitems":[]},{"name":"start temperature service","path":"/reference/bluetooth/start-temperature-service","subitems":[]},{"name":"start uart service","path":"/reference/bluetooth/start-uart-service","subitems":[]},{"name":"uart read until","path":"/reference/bluetooth/uart-read-until","subitems":[]},{"name":"uart write string","path":"/reference/bluetooth/uart-write-string","subitems":[]},{"name":"uart write number","path":"/reference/bluetooth/uart-write-number","subitems":[]},{"name":"uart write value","path":"/reference/bluetooth/uart-write-value","subitems":[]},{"name":"advertise url","path":"/reference/bluetooth/advertise-url","subitems":[]},{"name":"stop advertising","path":"/reference/bluetooth/stop-advertising","subitems":[]},{"name":"advertise uid","path":"/reference/bluetooth/advertise-uid","subitems":[]},{"name":"advertise-uid-buffer","path":"/reference/bluetooth/advertise-uid-buffer","subitems":[]}]}]},{"name":"Extensions","path":"/extensions","subitems":[]},{"name":"Blocks","path":"/blocks","subitems":[{"name":"On Start","path":"/blocks/on-start","subitems":[]},{"name":"Loops","path":"/blocks/loops","subitems":[{"name":"repeat","path":"/blocks/loops/repeat","subitems":[]},{"name":"for","path":"/blocks/loops/for","subitems":[]},{"name":"while","path":"/blocks/loops/while","subitems":[]},{"name":"for of","path":"/blocks/loops/for-of","subitems":[]}]},{"name":"Logic","path":"/blocks/logic","subitems":[{"name":"if","path":"/blocks/logic/if","subitems":[]},{"name":"Boolean","path":"/blocks/logic/boolean","subitems":[]}]},{"name":"Variables","path":"/blocks/variables","subitems":[{"name":"assign","path":"/blocks/variables/assign","subitems":[]},{"name":"change var","path":"/blocks/variables/change","subitems":[]},{"name":"var","path":"/blocks/variables/var","subitems":[]}]},{"name":"Math","path":"/blocks/math","subitems":[]},{"name":"JavaScript blocks","path":"/blocks/javascript-blocks","subitems":[]},{"name":"Custom blocks","path":"/blocks/custom","subitems":[]}]},{"name":"Python","path":"/python","subitems":[{"name":"Calling","path":"/python/call","subitems":[]},{"name":"Sequencing","path":"/python/sequence","subitems":[]},{"name":"Variables","path":"/python/variables","subitems":[]},{"name":"Operators","path":"/python/operators","subitems":[]},{"name":"Statements","path":"/python/statements","subitems":[]},{"name":"Functions","path":"/python/functions","subitems":[]},{"name":"Classes","path":"/python/classes","subitems":[]}]},{"name":"JavaScript","path":"/javascript","subitems":[{"name":"Calling","path":"/javascript/call","subitems":[]},{"name":"Sequencing","path":"/javascript/sequence","subitems":[]},{"name":"Variables","path":"/javascript/variables","subitems":[]},{"name":"Operators","path":"/javascript/operators","subitems":[]},{"name":"Statements","path":"/javascript/statements","subitems":[]},{"name":"Functions","path":"/javascript/functions","subitems":[]},{"name":"Types","path":"/javascript/types","subitems":[]},{"name":"Classes","path":"/javascript/classes","subitems":[]},{"name":"Interfaces","path":"/javascript/interfaces","subitems":[]},{"name":"Generics","path":"/javascript/generics","subitems":[]}]},{"name":"Types","path":"/types","subitems":[{"name":"Number","path":"/types/number","subitems":[]},{"name":"String","path":"/types/string","subitems":[]},{"name":"Boolean","path":"/types/boolean","subitems":[]},{"name":"Array","path":"/types/array","subitems":[]},{"name":"Function","path":"/types/function","subitems":[]},{"name":"Buffer","path":"/types/buffer","subitems":[{"name":"Using buffers","path":"/types/buffer/using-buffers","subitems":[]},{"name":"Number format","path":"/types/buffer/number-format","subitems":[]}]}]},{"name":"Hardware","path":"/device","subitems":[{"name":"Data Analysis","path":"/device/data-analysis","subitems":[{"name":"Plotting with LEDs","path":"/device/data-analysis/led-plotting","subitems":[]},{"name":"Viewing Data","path":"/device/data-analysis/viewing","subitems":[]},{"name":"Writing Data","path":"/device/data-analysis/writing","subitems":[]},{"name":"Generating Data","path":"/device/data-analysis/generating","subitems":[]},{"name":"Analyzing Data","path":"/device/data-analysis/analyze","subitems":[]},{"name":"Remote Data","path":"/device/data-analysis/remote","subitems":[]}]},{"name":"Error codes","path":"/device/error-codes","subitems":[]},{"name":"Foil circuits","path":"/device/foil-circuits","subitems":[]},{"name":"Incompatible Hardware","path":"/device/incompatible","subitems":[]},{"name":"MES events","path":"/device/mes-events","subitems":[]},{"name":"Pins","path":"/device/pins","subitems":[]},{"name":"Reactive","path":"/device/reactive","subitems":[]},{"name":"Screen","path":"/device/screen","subitems":[]},{"name":"Serial","path":"/device/serial","subitems":[]},{"name":"Servo","path":"/device/servo","subitems":[]},{"name":"Simulator","path":"/device/simulator","subitems":[]},{"name":"USB","path":"/device/usb","subitems":[]},{"name":"WebUSB","path":"/device/usb/webusb","subitems":[{"name":"WebUSB Troubleshoot","path":"/device/usb/webusb/troubleshoot","subitems":[]}]},{"name":"Flashing via HID (CMSIS-DAP)","path":"/hidflash","subitems":[]}]},{"name":"Blocks Gallery","path":"/block-gallery","subitems":[]},{"name":"Miscellaneous","path":"","subitems":[{"name":"About","path":"/about","subitems":[]},{"name":"Support","path":"/support","subitems":[]},{"name":"Translate","path":"/translate","subitems":[]},{"name":"Sharing projects","path":"/share","subitems":[]},{"name":"Offline support","path":"/offline","subitems":[]},{"name":"Save","path":"/save","subitems":[]}]},{"name":"Developers","path":"","subitems":[{"name":"Command Line Interface","path":"/cli","subitems":[]},{"name":"Visual Studio Code support","path":"/code","subitems":[]},{"name":"Blocks Embed","path":"/blocks-embed","subitems":[]}]},{"name":"Projects","path":"/projects","subitems":[{"name":"Flashing Heart","path":"/projects/flashing-heart","subitems":[]},{"name":"Smiley Buttons","path":"/projects/smiley-buttons","subitems":[]},{"name":"Love Meter","path":"/projects/love-meter","subitems":[]},{"name":"Rock Paper Scissors","path":"/projects/rock-paper-scissors","subitems":[]},{"name":"Magic Button Trick","path":"/projects/magic-button-trick","subitems":[]},{"name":"Coin Flipper","path":"/projects/coin-flipper","subitems":[]},{"name":"Salute!","path":"/projects/salute","subitems":[]},{"name":"Hack Your Headphones","path":"/projects/hack-your-headphones","subitems":[]},{"name":"Banana Keyboard","path":"/projects/banana-keyboard","subitems":[]},{"name":"Guitar","path":"/projects/guitar","subitems":[]},{"name":"Duct Tape Wallet","path":"/projects/wallet","subitems":[]},{"name":"Watch","path":"/projects/watch","subitems":[]},{"name":"Soil Moisture","path":"/projects/soil-moisture","subitems":[]},{"name":"Plant Watering","path":"/projects/plant-watering","subitems":[]},{"name":"Reaction Time","path":"/projects/reaction-time","subitems":[]},{"name":"States of Matter","path":"/projects/states-of-matter","subitems":[]},{"name":"Mood Radio","path":"/projects/mood-radio","subitems":[]},{"name":"Tele-Potato","path":"/projects/tele-potato","subitems":[]},{"name":"Hot or Cold","path":"/projects/hot-or-cold","subitems":[]},{"name":"Voting Machine","path":"/projects/voting-machine","subitems":[]},{"name":"Infection","path":"/projects/infection","subitems":[]},{"name":"Fireflies","path":"/projects/fireflies","subitems":[]},{"name":"Rock Paper Scissors Teams","path":"/projects/rps-teams","subitems":[]},{"name":"Inchworm","path":"/projects/inchworm","subitems":[]},{"name":"Milk Carton Robot","path":"/projects/milk-carton-robot","subitems":[]},{"name":"Milk Monster","path":"/projects/milky-monster","subitems":[]},{"name":"RC Car","path":"/projects/rc-car","subitems":[]},{"name":"Timing Gates","path":"/projects/timing-gates","subitems":[]},{"name":"Compass","path":"/projects/compass","subitems":[]},{"name":"Telegraph","path":"/projects/telegraph","subitems":[]},{"name":"Railway Crossing","path":"/projects/railway-crossing","subitems":[]},{"name":"Karel","path":"/projects/karel","subitems":[]},{"name":"Stopwatch","path":"/projects/stopwatch","subitems":[]},{"name":"Name Tag","path":"/projects/name-tag","subitems":[]},{"name":"Step counter","path":"/projects/step-counter","subitems":[]},{"name":"Servo calibrator","path":"/projects/servo-calibrator","subitems":[]},{"name":"Analog Pin Tester","path":"/projects/analog-pin-tester","subitems":[]},{"name":"Light Level Meter","path":"/projects/light-level-meter","subitems":[]},{"name":"Radio bridge","path":"/projects/radio-bridge","subitems":[]},{"name":"Snap the dot","path":"/projects/snap-the-dot","subitems":[]},{"name":"Red light green light","path":"/projects/red-light-green-light","subitems":[]},{"name":"Name Badge","path":"/projects/name-badge","subitems":[]}]}],"id":"microbit","title":"Microsoft MakeCode for micro:bit","name":"makecode.microbit.org","description":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","htmlDocIncludes":{}}
|
|
@@ -6,7 +6,7 @@ Whether creating equations in Boolean algebra or using them in your programs, yo
|
|
|
6
6
|
|
|
7
7
|
Boolean (logical) equations are expressed in a way similar to mathmatical equations. Variables in Boolean expressions though, have only two possible values, ``true`` or ``false``. For an equation using a logical expression, the equivalant sides of the equal sign ,``=``, will be only ``true`` or ``false`` too.
|
|
8
8
|
|
|
9
|
-
The following list shows the basic notation elements for Boolean expressions
|
|
9
|
+
The following list shows the basic notation elements for variables and operators in Boolean expressions:
|
|
10
10
|
|
|
11
11
|
* ``~A``: the inverse (**NOT**) of ``A``, when ``A`` is ``true``, ``~A`` is ``false``
|
|
12
12
|
* ``A + B``: the value of ``A`` **OR** ``B``
|
|
@@ -205,3 +205,10 @@ F | F | F
|
|
|
205
205
|
T | F | T
|
|
206
206
|
F | T | T
|
|
207
207
|
T | T | F
|
|
208
|
+
<br/>
|
|
209
|
+
|
|
210
|
+
## ~button /courses/logic-lab/explorer
|
|
211
|
+
|
|
212
|
+
NEXT: Logic Explorer
|
|
213
|
+
|
|
214
|
+
## ~
|
|
@@ -4,7 +4,7 @@ As a way to see how the basic logical operators work, we'll make a program to te
|
|
|
4
4
|
|
|
5
5
|
## Inputs and output
|
|
6
6
|
|
|
7
|
-
Make an array called ``||variables:inputs||`` with two values, ``false`` and ``true``, as logical inputs. Add another variable ``||variables:Q||`` to receive the resulting value of a logical expression as output.
|
|
7
|
+
Make an ``||arrays:array||`` called ``||variables:inputs||`` with two values, ``false`` and ``true``, as logical inputs. Add another variable ``||variables:Q||`` to receive the resulting value of a logical expression as output.
|
|
8
8
|
|
|
9
9
|
```blocks
|
|
10
10
|
let inputs = [false, true]
|
|
@@ -17,7 +17,7 @@ To start with, we'll make a single input test for the variable ``||variables:A||
|
|
|
17
17
|
|
|
18
18
|
1. Get a ``||loops:for element||`` loop and put it in the ``||loops:on start||``. Rename the ``||variables:index||`` variable to ``||variables:A||`` and switch the ``||variables:list||`` variable to ``||variables:inputs||``.
|
|
19
19
|
2. Pull a ``||variables:set Q to||`` block into the ``||loops:for element||`` loop and set the value to ``||logic:false||``.
|
|
20
|
-
3. Go find the ``||logic:if then else||`` and put in below the ``||variables:set Q to||``. Pick up a ``||variables:Q||``
|
|
20
|
+
3. Go find the ``||logic:if then else||`` and put in below the ``||variables:set Q to||``. Pick up a ``||variables:Q||`` from the ``||variables:VARIABLES||`` Toolbox drawer and drop it onto the ``||logic:false||`` to replace it.
|
|
21
21
|
4. Move a ``||basic:show icon||`` inside the ``||logic:if then||`` section and change the image to a ``t-shirt``. This is our image for a ``true`` output.
|
|
22
22
|
5. Move a ``||basic:show icon||`` inside the ``||logic:else||`` section and change the image to a ``small diamond``. This is our image for a ``false`` output.
|
|
23
23
|
6. Just below the ``||logic:if then else||``, put in a ``||loops:pause||``, a ``||basic:clear screen||``, and another ``||basic:pause||`` block. Set the time for each ``||basic:pause||`` to ``500``.
|
|
@@ -143,7 +143,7 @@ A | B | A · B
|
|
|
143
143
|
|
|
144
144
|
## XOR test
|
|
145
145
|
|
|
146
|
-
To test XOR, we'll use the XOR expression from [Boolean elements](/courses/logic-lab/elements#xor). Drag and place the ``||logic:LOGIC||`` blocks to make the ``||variables:Q||`` equation to look like this:
|
|
146
|
+
To test XOR, we'll use the XOR expression from [Boolean elements](/courses/logic-lab/elements#xor). Drag and place the ``||logic:LOGIC||`` blocks in to make the ``||variables:Q||`` equation to look like this:
|
|
147
147
|
|
|
148
148
|
```block
|
|
149
149
|
let A = false
|
|
@@ -159,4 +159,11 @@ A | B | A ⊕ B
|
|
|
159
159
|
**false** | **false** | ``[basic.showIcon(IconNames.SmallDiamond)]``
|
|
160
160
|
**false** | **true** | ``[basic.showIcon(IconNames.TShirt)]``
|
|
161
161
|
**true** | **false** | ``[basic.showIcon(IconNames.TShirt)]``
|
|
162
|
-
**true** | **true** | ``[basic.showIcon(IconNames.SmallDiamond)]``
|
|
162
|
+
**true** | **true** | ``[basic.showIcon(IconNames.SmallDiamond)]``
|
|
163
|
+
<br/>
|
|
164
|
+
|
|
165
|
+
## ~button /courses/logic-lab/logic-gates
|
|
166
|
+
|
|
167
|
+
NEXT: Logic Gates
|
|
168
|
+
|
|
169
|
+
## ~
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Logic and expressions
|
|
2
2
|
|
|
3
|
-
The use and study of _logic_ involves finding a new fact by analyzing whether some other facts together can prove to be true. Some facts, or conditions, when looked at together may prove another fact to be true, or maybe false.
|
|
3
|
+
The use and study of _logic_ involves finding a new fact by analyzing whether some other facts, when brought together, can prove that fact to be true. Some facts, or conditions, when looked at together may prove another fact to be true, or maybe false.
|
|
4
4
|
|
|
5
|
-
If the temperature outside is below freezing and you don't have a coat, you will feel cold. If you're not sick, then you will feel well. If you can swim or ride in a boat
|
|
5
|
+
If the temperature outside is below freezing and you don't have a coat, you will feel cold. If you're not sick, then you will feel well. If you can swim or ride in a boat on water, you will stay afloat. These are statements of fact that result from some condition being true.
|
|
6
6
|
|
|
7
7
|
## Truth statements
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ By taking some facts and putting them into a logical form, we can make an arithm
|
|
|
12
12
|
* **NOT** ``sick`` **=** ``I feel well``
|
|
13
13
|
* ``I can swim`` **OR** ``I'm in a boat`` **=** ``I'm floating``
|
|
14
14
|
|
|
15
|
-
You see the AND, NOT, and OR in the example word equations? These are our logical _operators_. Every day we make decisions when we think about one or more facts together using these operators. Sometimes, it's necessary for all facts to be true in order for the conclusion to be true. This is the case when the AND operator is used. When analyzing facts with the OR operator, only
|
|
15
|
+
You see the AND, NOT, and OR in the example word equations? These are our logical _operators_. Every day we make decisions when we think about one or more facts together using these operators. Sometimes, it's necessary for all facts to be true in order for the conclusion to be true. This is the case when the AND operator is used. When analyzing facts with the OR operator, only one fact needs to be true for the conclusion to be true also.
|
|
16
16
|
|
|
17
17
|
Making a decision may require more than just one or two facts. When this happens, another operator is needed to combine the facts together to make a conclusion. In the last example word equation, you actually might not be floating if just those two condtions are true. To correctly prove that you're actually floating, you need to state that you're in water too.
|
|
18
18
|
|
|
@@ -109,7 +109,7 @@ Because you feel cold only when both conditions are true, the statement becomes
|
|
|
109
109
|
|
|
110
110
|
``A · B`` = ``Q``
|
|
111
111
|
|
|
112
|
-
A truth table for the variables in the expression have the same values as the table for the truth statement (``true`` and ``false`` are abbreviated to just ``T`` and ``F``).
|
|
112
|
+
A truth table for the Boolean variables in the expression have the same values as the table for the truth statement (``true`` and ``false`` are abbreviated to just ``T`` and ``F``).
|
|
113
113
|
|
|
114
114
|
A | B | Q
|
|
115
115
|
-|-|-
|
|
@@ -140,3 +140,9 @@ T | F | F
|
|
|
140
140
|
To write a Boolean equation for when you feel cold, we find the condtions in the table where ``Q`` is ``true``. Here we see that you will feel cold only in one row, when condition ``A`` is ``true`` and condtion ``B`` is ``false``. The Boolean equation for these conditions is this:
|
|
141
141
|
|
|
142
142
|
``A · ~B`` = ``Q``
|
|
143
|
+
|
|
144
|
+
## ~button /courses/logic-lab/elements
|
|
145
|
+
|
|
146
|
+
NEXT: Boolean Elements
|
|
147
|
+
|
|
148
|
+
## ~
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
In the real world digital devices aren't the abstract logical expressions of Boolean algebra, but they are implementations of these expressions in hardware. The logical expressions are translated into device structures called _logic gates_. A logic gate is both a symbolic representation of a logical operation and, when used in digital electronics, it
|
|
5
|
+
In the real world digital devices aren't the abstract logical expressions of Boolean algebra, but they are implementations of these expressions in hardware. The logical expressions are translated into device structures called _logic gates_. A logic gate is both a symbolic representation of a logical operation and, when used in digital electronics, it is an actual circuit in hardware. A single logic gate is usually made of several transistors an shares space with many others in an integrated circuit.
|
|
6
6
|
|
|
7
7
|
Each of the basic operators we learned about in the [expressions](/courses/logic-lab/expressions) section have a gate symbol. The symbol takes the place of the operator and the variables are the inputs to the gate. The resulting value from the expression equation is the output of the gate. The output of a gate can be a final result or it can be connected as an input to yet another gate.
|
|
8
8
|
|
|
@@ -85,3 +85,9 @@ When this equation is converted to logic gates, there's one fewer gate than in t
|
|
|
85
85
|

|
|
86
86
|
|
|
87
87
|
This diagram has less complexity than the first one. Reduction in the number of gates to accomplish the same logical result is one of the primary goals for digital logic design. For electronic devices, this allows more gates to use the limited amount of space on an integrated circuit.
|
|
88
|
+
|
|
89
|
+
## ~button /courses/logic-lab/programmable
|
|
90
|
+
|
|
91
|
+
NEXT: Programmable Logic
|
|
92
|
+
|
|
93
|
+
## ~
|
|
@@ -135,9 +135,9 @@ if (pins.digitalReadPin(DigitalPin.P6) > 0) {
|
|
|
135
135
|
|
|
136
136
|
You can test different input combinations by connecting the other ends of alligator clip leads on pins **P0** and **P1** to either **GND** or **3V**. The **GND** pin will make a ``false`` input value and **3V** will make a ``true`` input value.
|
|
137
137
|
|
|
138
|
-
If you have an expansion connector for your @boardname@, you can use the combined logic script and the logic observer code to check each ouptput. Move the other end alligator clip lead connected to the observer pin **P6** to each of the outputs **P2**, **P3**, and **P4** to see the result of the logic operation programmed for those pins.
|
|
138
|
+
If you have an expansion connector for your @boardname@, you can use the combined logic script and the logic observer code to check each ouptput. Move the other end of the alligator clip lead connected to the observer pin **P6** to each of the outputs **P2**, **P3**, and **P4** to see the result of the logic operation programmed for those pins.
|
|
139
139
|
|
|
140
|
-
If you just have the @boardname@ by itself, you can test each logic function using only the scripts for each logic gate. Just put the script inside a ``||loops:forever||`` and place a ``||basic:show string||`` block with the logic letter after each ``||pins:digital write pin||``.
|
|
140
|
+
If you just have the @boardname@ by itself, you can test each logic function using only the scripts for each logic gate. Just put the script inside a ``||loops:forever||`` loop and place a ``||basic:show string||`` block with the logic letter after each ``||pins:digital write pin||``.
|
|
141
141
|
|
|
142
142
|
This is the code for the **NOT** gate:
|
|
143
143
|
|
|
@@ -164,7 +164,7 @@ GND | 3V | ``[basic.showString("T")]``
|
|
|
164
164
|
3V | GND | ``[basic.showString("F")]``
|
|
165
165
|
<br/>
|
|
166
166
|
|
|
167
|
-
Do test connections for the inputs
|
|
167
|
+
Do test connections for the inputs, then check and record the results for the **OR** and **AND** outputs.
|
|
168
168
|
|
|
169
169
|
#### OR truth table
|
|
170
170
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
A basic aspect of knowledge and understanding is whether something is true or not. Considering conditions around you and making a conclusion about something being true or false means that you are using logic. Computers and, in fact, all of digital electronics rely on this idea of logic to process information and give results in terms of conditions being true or false. Logic is used almost everywhere in the programs you write in places where you want decide to do one task or another.
|
|
5
|
+
A basic aspect of knowledge and understanding is whether something is true or not. Considering conditions around you and making a conclusion about something being true or false means that you are using logic. Computers and, in fact, all of digital electronics rely on this idea of logic to process information and give results in terms of conditions being either true or false. Logic is used almost everywhere in the programs you write in the places where you want decide to do one task or another.
|
|
6
6
|
|
|
7
7
|
## Logic topics
|
|
8
8
|
|
|
@@ -13,3 +13,9 @@ These topic sections teach you about applying logic to conditions and using Bool
|
|
|
13
13
|
* [Logic Explorer](/courses/logic-lab/explorer)
|
|
14
14
|
* [Logic Gates](/courses/logic-lab/logic-gates)
|
|
15
15
|
* [Programmable Logic](/courses/logic-lab/programmable)
|
|
16
|
+
|
|
17
|
+
## ~button /courses/logic-lab/expressions
|
|
18
|
+
|
|
19
|
+
Let's get started!
|
|
20
|
+
|
|
21
|
+
## ~
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-microbit",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.27",
|
|
4
4
|
"description": "micro:bit target for Microsoft MakeCode (PXT)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"pxt-common-packages": "10.4.9",
|
|
49
|
-
"pxt-core": "8.6.
|
|
49
|
+
"pxt-core": "8.6.34"
|
|
50
50
|
}
|
|
51
51
|
}
|
package/pxtarget.json
CHANGED
|
@@ -418,8 +418,6 @@
|
|
|
418
418
|
"debugExtensionCode",
|
|
419
419
|
"bluetoothUartConsole",
|
|
420
420
|
"bluetoothPartialFlashing",
|
|
421
|
-
"simScreenshot",
|
|
422
|
-
"simGif",
|
|
423
421
|
"identity",
|
|
424
422
|
"blocksErrorList"
|
|
425
423
|
],
|
|
@@ -538,7 +536,9 @@
|
|
|
538
536
|
"debugger": true,
|
|
539
537
|
"simGifTransparent": "rgba(0,0,0,0)",
|
|
540
538
|
"simGifMaxFrames": 44,
|
|
539
|
+
"simScreenshot": true,
|
|
541
540
|
"simScreenshotMaxUriLength": 300000,
|
|
541
|
+
"simGif": true,
|
|
542
542
|
"qrCode": true,
|
|
543
543
|
"importExtensionFiles": true,
|
|
544
544
|
"nameProjectFirst": true,
|