{"id":3549,"date":"2019-08-27T16:01:12","date_gmt":"2019-08-27T14:01:12","guid":{"rendered":"https:\/\/www.byor.nl\/?page_id=3549"},"modified":"2019-09-11T12:32:26","modified_gmt":"2019-09-11T10:32:26","slug":"mission-control-theme-coding-mission-2","status":"publish","type":"page","link":"https:\/\/www.byor.nl\/en\/mission-control-theme-coding-mission-2\/","title":{"rendered":"Mission Control | Theme Coding | Mission 2"},"content":{"rendered":"<style>\r\n.topshop-header-layout-standard {\r\n\tdisplay: none !important;\t\r\n}\r\n.site-footer {\r\n\tdisplay: none !important;\r\n}\r\n.customize-support {\r\nbackground-color:#000000 !important;\r\nbackground-size:100% !important;\r\nbackground: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 1)), url('http:\/\/byor.nl\/img\/missionbg.jpg');\r\n}\r\n.body {\r\nbackground-color:#000000 !important;\r\nbackground-size:100%;\r\n}\r\na:link {\r\n  color: #7e7ab9;\r\n  text-decoration: underline;\r\n}\r\na:visited {\r\n  color: #7e7ab9;\r\n  text-decoration: underline;\r\n}\r\na:hover {\r\n  color: #7cc9a0;\r\n}\r\n<\/style>\r\n<div class=\"full-width-div-no-head-foot-outer\">\r\n<div class=\"full-width-div-no-head-foot-inner\">\r\n<div style=\"position: fixed; right: 35px; top: 35px; color: #fff;\">Log in<\/div>\r\n<div class=\"roes-MC-title\"><img decoding=\"async\" style=\"width: 15%; min-width: 150px; margin-top: 35px; margin-bottom: -15px;\" src=\"http:\/\/byor.nl\/img\/MClogohalf.png\" \/>\r\n<h1 style=\"color: #fff; font-weight: bold; font-size: 50px; text-shadow: 2px 2px #939598;\">MISSION CONTROL<\/h1>\r\n<h4 style=\"color: #fff;\">Start the video below to hear the transmission from the spaceship.<\/h4>\r\n<!-- https:\/\/maxl.us\/hideyt --><style>.hytPlayerWrap{display: inline-block; position: relative;}.hytPlayerWrap.ended::after{content:\"\"; position: absolute; top: 0; left: 0; bottom: 0; right: 0; cursor: pointer; background-color: black; background-repeat: no-repeat; background-position: center; background-size: 64px 64px; background-image: url(data:image\/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgNTEwIDUxMCI+PHBhdGggZD0iTTI1NSAxMDJWMEwxMjcuNSAxMjcuNSAyNTUgMjU1VjE1M2M4NC4xNSAwIDE1MyA2OC44NSAxNTMgMTUzcy02OC44NSAxNTMtMTUzIDE1My0xNTMtNjguODUtMTUzLTE1M0g1MWMwIDExMi4yIDkxLjggMjA0IDIwNCAyMDRzMjA0LTkxLjggMjA0LTIwNC05MS44LTIwNC0yMDQtMjA0eiIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg==);}.hytPlayerWrap.paused::after{content:\"\"; position: absolute; top: 70px; left: 0; bottom: 50px; right: 0; cursor: pointer; background-color: black; background-repeat: no-repeat; background-position: center; background-size: 40px 40px; background-image: url(data:image\/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNzA2LjY2NyIgaGVpZ2h0PSIxNzA2LjY2NyIgdmlld0JveD0iMCAwIDEyODAgMTI4MCI+PHBhdGggZD0iTTE1Ny42MzUgMi45ODRMMTI2MC45NzkgNjQwIDE1Ny42MzUgMTI3Ny4wMTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+);}<\/style><div class=\"hytPlayerWrapOuter\"> <div class=\"hytPlayerWrap\"> <iframe loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/x4GiTFwzdMw?rel=0&#038;enablejsapi=1\" frameborder=\"0\" ><\/iframe> <\/div><\/div><script>\"use strict\"; document.addEventListener('DOMContentLoaded', function(){if (window.hideYTActivated) return; let onYouTubeIframeAPIReadyCallbacks=[]; for (let playerWrap of document.querySelectorAll(\".hytPlayerWrap\")){let playerFrame=playerWrap.querySelector(\"iframe\"); let tag=document.createElement('script'); tag.src=\"https:\/\/www.youtube.com\/iframe_api\"; let firstScriptTag=document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); let onPlayerStateChange=function(event){if (event.data==YT.PlayerState.ENDED){playerWrap.classList.add(\"ended\");}else if (event.data==YT.PlayerState.PAUSED){playerWrap.classList.add(\"paused\");}else if (event.data==YT.PlayerState.PLAYING){playerWrap.classList.remove(\"ended\"); playerWrap.classList.remove(\"paused\");}}; let player; onYouTubeIframeAPIReadyCallbacks.push(function(){player=new YT.Player(playerFrame,{events:{'onStateChange': onPlayerStateChange}});}); playerWrap.addEventListener(\"click\", function(){let playerState=player.getPlayerState(); if (playerState==YT.PlayerState.ENDED){player.seekTo(0);}else if (playerState==YT.PlayerState.PAUSED){player.playVideo();}});}window.onYouTubeIframeAPIReady=function(){for (let callback of onYouTubeIframeAPIReadyCallbacks){callback();}}; window.hideYTActivated=true;});<\/script>\r\n\r\n&nbsp;\r\n<h1 style=\"color: #fff; font-weight: bold; font-size: 50px;\">Protocol Alpha<\/h1>\r\n<h4 style=\"color: #fff; margin-top: -25px;\">Programming language<\/h4>\r\n<div class=\"roes-MC-block\">\r\n<h4 style=\"color: #7e7ab9;\">Symbols<\/h4>\r\n<h5>We are going to use the array of LEDs to show symbols. To do this, open de <a href=\"https:\/\/makecode.microbit.org\/#editor\" target=\"_new\">code-editor<\/a> and start making the code which is shown below.<\/h5>\r\n<img decoding=\"async\" style=\"width: 80%; max-width:400px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/symbolcode.png\" \/><br>\r\n<h5 style=\"color: #231f20; margin-top: 25px;\">The micro:bit leds wil now alternate between the symbol of a heart and a dinosaur. Effectively showing that you love dinosaurs.<\/h5>\r\n<img decoding=\"async\" style=\"width: 80%; max-width:400px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/microbitheart.png\" \/><br>\r\n<h5>Note that the micro:bit which is shown on screen on the left already shows what will happen once this code is uploaded to a physical micro:bit. Upload this code to your micro:bit to see what happens.<\/h5>\r\n\r\n<\/div>\r\n<div class=\"roes-MC-block\">\r\n<h4 style=\"color: #7e7ab9;\">Make your own!<\/h4>\r\n<h5>Now these are pre-programmed symbols, which can be very helpful, but you can also make your own symbol. Use the &#8220;Show leds&#8221; block and click on the cubes to fill them up, this means those LEDs will turn on. Go ahead and make your own symbol of light!<\/h5>\r\n<img decoding=\"async\" style=\"width: 80%; max-width:400px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/symboloflight.png\" \/>\r\n<br>\r\n<h5>Upload your code to see it in actual light!<\/h5>\r\n\r\n<\/div>\r\n<br>\r\n<h1 style=\"color: #fff; font-weight: bold; font-size: 50px;\">Protocol Bravo<\/h1>\r\n<h4 style=\"color: #fff; margin-top: -25px;\">Language of programming<\/h4>\r\n<div class=\"roes-MC-block\">\r\n   <h4 style=\"color: #7e7ab9;\">Speak up!<\/h4>\r\n  <h5>Programming is also a language on its own. Sometimes it uses words from your language. Maybe the most important words are &#8216;IF&#8217; and &#8216;THEN&#8217;. You can use them just as in your language. For example you could say: IF i get cold, THEN I will put on a sweater. This is something a robot can think too!<br>\r\nWe are going to make a robot speak up once he sees light. Using the BYOR light sensor and the micro:bit. Connect the light sensor to input 0.<br>\r\n<img decoding=\"async\" style=\"width: 80%; max-width:700px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/MB5.jpg\" \/>\r\nWe are going to read the light sensor and IF the light gets bright, THEN the robot will say &#8220;Light!&#8221;<br>\r\nCreate the code shown below, remember you can search for blocks of code using the search bar. The IF block and the comparison block are under Logic.<\/h5>\r\n<img decoding=\"async\" style=\"width: 80%; max-width:500px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/seelight.png\" \/>\r\n<br>\r\n<h5>Upload the code, connect a light sensor to your Easyboard (the port that says 0), attach your micro:bit to the Easyboard and power it all! <br>\r\nUse your hand to cover and uncover the sensor. If necessary, shine a light on the sensor to trigger the text.<br>\r\nYou can also change the number 250 in the code to finetune when the sensor will work.<\/h5>\r\n<br>\r\n<h4 style=\"color: #7e7ab9;\">Speak Robo!<\/h4>\r\n<h5>Now we will make the robot talk with the morse code we used before, as well as the human language english, so aliens can understand as well. We will use the super strong alien LED. <br>\r\nConnect the light sensor and the LED to the Easyboard on port 0 and P13 as shown below.\r\n<img decoding=\"async\" style=\"width: 80%; max-width:700px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/MB4.jpg\" \/>\r\n<h5>We will send the letter X again when the sensor sees light. See the image below for the code. <br>\r\n<img decoding=\"async\" style=\"width: 80%; max-width:700px;\" src=\"https:\/\/www.byor.nl\/img\/MissionControlTheme2\/textandmorse.png\" \/><br>\r\nNote that we first set the port for the LED to 0, in the &#8216;on start&#8217; block. Blocks inside the &#8216;on start&#8217; block are only done once, and in this case the led is turned off.<\/h5>\r\n<\/div>\r\n\r\n<h1 style=\"color: #fff; font-weight: bold; font-size: 50px; margin-top: 25px;\">Protocol Charly<\/h1>\r\n<h4 style=\"color: #fff; margin-top: -25px;\">Automatic message<\/h4>\r\n\r\n<div class=\"roes-MC-block\">\r\n   <h4 style=\"color: #7e7ab9;\">Switch it up<\/h4>\r\n  <h5>Connect the same hardware as in the previous protocol and open the same code. Change the > signal inside the IF statement to < . The message will now send when it is dark, so it will automatically start when it is best visible. Change the text and the blinking of the LED as you would like it and build the hardware into a messaging device. Place it outside in the dark and test it, to see if it works. <\/h5>\r\n<h5>Show us in a video, upload using the portal \ud83d\ude42<\/h5>\r\n<\/div>\r\n\r\n\r\n\r\n\r\n<div class=\"roes-MC-block\" style=\"background-color: #efeff7;\">\r\n<h1>Show us your creation!<\/h1>\r\n<h4>Be sure you are logged in to receive your space tokens!<\/h4>\r\n<h5>Log in<\/h5>\r\n<h4>Upload a video of your creation and send us the link!<\/h4>\r\n\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f3537-o1\" lang=\"nl-NL\" dir=\"ltr\" data-wpcf7-id=\"3537\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/wp-json\/wp\/v2\/pages\/3549\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contactformulier\" novalidate=\"novalidate\" data-status=\"init\" data-trp-original-action=\"\/en\/wp-json\/wp\/v2\/pages\/3549#wpcf7-f3537-o1\">\n<fieldset class=\"hidden-fields-container\"><input type=\"hidden\" name=\"_wpcf7\" value=\"3537\" \/><input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.1.1\" \/><input type=\"hidden\" name=\"_wpcf7_locale\" value=\"nl_NL\" \/><input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f3537-o1\" \/><input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/><input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/>\n<\/fieldset>\n<h3 style=\"margin-top:0px; margin-bottom:0px;\">Your username\n<\/h3>\n<p><span class=\"wpcf7-form-control-wrap\" data-name=\"your-name\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required roes-field\" id=\"roes-MC-field\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Your username, tokens will go to this user\" value=\"\" type=\"text\" name=\"your-name\" \/><\/span>\n<\/p>\n<h3 style=\"margin-top:0px; margin-bottom:3px;\">Your video\n<\/h3>\n<p><span class=\"wpcf7-form-control-wrap\" data-name=\"url-106\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-url wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-url roes-field\" aria-required=\"true\" aria-invalid=\"false\" placeholder=\"Paste your video-link here\" value=\"\" type=\"url\" name=\"url-106\" \/><\/span>\n<\/p>\n<p><span style=\"font-size:16px; margin-bottom:16px; margin-top:-20px;\">Upload your video through <a href=\"https:\/\/www.youtube.com\/\" target=\"_new\" style=\"text-decoration: underline;\" >Youtube<\/a>, <a href=\"https:\/\/vimeo.com\/\" target=\"_new\" style=\"text-decoration: underline;\">Vimeo<\/a> or social media!<\/span>\n<\/p>\n<p><input class=\"wpcf7-form-control wpcf7-submit has-spinner roes-button-style\" id=\"roes-form-button-MC\" type=\"submit\" value=\"Submit evidence and go!\" \/>\n<\/p><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\n<\/div>\n\r\n<a href=\"https:\/\/www.byor.nl\/en\/mission-control-theme-coding-mission-3\/\">skip (you won&#8217;t receive tokens)<\/a>\r\n<\/div>\r\n<img decoding=\"async\" style=\"width: 15%; min-width: 150px; margin-top: 35px; margin-bottom: -15px;\" src=\"http:\/\/byor.nl\/img\/MCbadgeclose.png\" \/>\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"roes-MC-footer\">\r\n<div style=\"width: 60%; margin-left: auto; margin-right: auto;\">\r\n<div style=\"display: inline-block; width: 29%; min-width: 300px;\"><a href=\"https:\/\/www.nowyouknowchannel.com\/\" target=\"_new\"><img decoding=\"async\" style=\"width: 30%;\" src=\"https:\/\/www.byor.nl\/img\/NYKlogo.png\" \/><\/a><\/div>\r\n<div style=\"display: inline-block; width: 29%; vertical-align: top; padding-top: 30px; min-width: 300px;\">\r\n<h5>BYOR Mission Control\r\ninfo@byor.nl\r\n<a href=\"http:\/\/www.BYORcraft.com\">www.BYORcraft.com<\/a>\r\n<a href=\"http:\/\/www.nowyouknowchannel.com\">www.nowyouknowchannel.com<\/a><\/h5>\r\n<\/div>\r\n<div style=\"display: inline-block; width: 29%; min-width: 300px;\"><a href=\"https:\/\/www.byor.nl\/en\/\" target=\"_new\"><img decoding=\"async\" style=\"width: 60%; margin-left: 25px;\" src=\"https:\/\/www.byor.nl\/img\/missioncontrollogo.png\" \/>\r\n<\/a><\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>MISSION CONTROL Start the video below to hear the transmission from the spaceship. &nbsp; Protocol Alpha Programming language Symbols We are going to use the array of LEDs to show symbols. To do this, open de code-editor and start making the code which is shown below. The micro:bit leds wil now alternate between the symbol [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"wf_page_folders":[69],"class_list":["post-3549","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/pages\/3549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/comments?post=3549"}],"version-history":[{"count":4,"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/pages\/3549\/revisions"}],"predecessor-version":[{"id":3981,"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/pages\/3549\/revisions\/3981"}],"wp:attachment":[{"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/media?parent=3549"}],"wp:term":[{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/www.byor.nl\/en\/wp-json\/wp\/v2\/wf_page_folders?post=3549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}