{"id":76,"date":"2024-02-21T15:21:30","date_gmt":"2024-02-21T15:21:30","guid":{"rendered":"https:\/\/learnlearn.uk\/stemrobotics\/?page_id=76"},"modified":"2024-02-22T08:59:02","modified_gmt":"2024-02-22T08:59:02","slug":"communication-between-2-microbits","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/","title":{"rendered":"Communication Between 2 Microbits"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Introduction<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Introduction<\/h3>\n<p>Often when we are using Microbits we want them to be able to communicate with each other. This can be done easily using the <strong>radio menu blocks<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-84 size-full\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/radio.png?_t=1708591352\" alt=\"\" width=\"237\" height=\"59\" \/><\/p>\n<p><strong>Setting the radio group (channel)<\/strong><\/p>\n<p>The first thing we need to set is the group. In the classroom there might be lots of different Microbits sending signals so we can ours to only send and receive on a certain channel.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-83 size-full\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/radio-group.png?_t=1708591351\" alt=\"\" width=\"246\" height=\"78\" \/><\/p>\n<p><strong>Sending messages<\/strong><\/p>\n<p>Once we have set our channel (usually in the start block) we can send different signals, for instance strings (text)\u00a0 or integers(whole numbers)<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-81 alignleft\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/radio-string.png\" alt=\"\" width=\"257\" height=\"81\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-82 size-full alignleft\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/radio-number.png?_t=1708591348\" alt=\"\" width=\"255\" height=\"83\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>If you\u00a0 have a more complicated program you can always use dictionary (key &#8211; value pairs) style messages if you need more advanced control.<\/p>\n<p><strong>Receiving messages<\/strong><\/p>\n<p>When a message is received by another Microbit it is handled by the <strong>on radio received<\/strong> blocks.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-88 alignnone\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/receiving-messages.png\" alt=\"\" width=\"380\" height=\"276\" srcset=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/receiving-messages.png 380w, https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/receiving-messages-300x218.png 300w\" sizes=\"(max-width: 380px) 100vw, 380px\" \/><\/p>\n\n<\/div><h2 class=\"tabtitle\">Sender Code<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Sender Code<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-85 alignnone\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/sender-code.png\" alt=\"\" width=\"328\" height=\"320\" srcset=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/sender-code.png 328w, https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/sender-code-300x293.png 300w\" sizes=\"(max-width: 328px) 100vw, 328px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Receiver Code<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Sender Code<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-86 alignnone\" src=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/receiver-code.png\" alt=\"\" width=\"526\" height=\"428\" srcset=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/receiver-code.png 526w, https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/receiver-code-300x244.png 300w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Resources<\/h3>\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/112aQq_Uh5ToxSz2Ac_SwLAoo0Hr66qLWEOMfxcIi07c\/edit?usp=sharing\">Experiment Worksheet<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Often when we are using Microbits we want them to be able to communicate with each other. This can be done easily using the radio menu blocks. Setting the radio group (channel) The first thing we need to set is the group. In the classroom there might be lots of different Microbits sending signals&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Communication Between 2 Microbits<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":100,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Communication Between 2 Microbits - Stem Robotics<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Communication Between 2 Microbits - Stem Robotics\" \/>\n<meta property=\"og:description\" content=\"Introduction Often when we are using Microbits we want them to be able to communicate with each other. This can be done easily using the radio menu blocks. Setting the radio group (channel) The first thing we need to set is the group. In the classroom there might be lots of different Microbits sending signals&hellip;&nbsp;Read More &raquo;Communication Between 2 Microbits\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/\" \/>\n<meta property=\"og:site_name\" content=\"Stem Robotics\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-22T08:59:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/radio.png?_t=1708591352\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/\",\"url\":\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/\",\"name\":\"Communication Between 2 Microbits - Stem Robotics\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/#website\"},\"datePublished\":\"2024-02-21T15:21:30+00:00\",\"dateModified\":\"2024-02-22T08:59:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/learnlearn.uk\/stemrobotics\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Communication Between 2 Microbits\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/#website\",\"url\":\"https:\/\/learnlearn.uk\/stemrobotics\/\",\"name\":\"Stem Robotics LearnLearnuk\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/stemrobotics\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/#organization\",\"name\":\"Learnlearn\",\"url\":\"https:\/\/learnlearn.uk\/stemrobotics\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2023\/06\/LearnLearnLogo-Light-Blue.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2023\/06\/LearnLearnLogo-Light-Blue.png\",\"width\":710,\"height\":98,\"caption\":\"Learnlearn\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/stemrobotics\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Communication Between 2 Microbits - Stem Robotics","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/","og_locale":"en_GB","og_type":"article","og_title":"Communication Between 2 Microbits - Stem Robotics","og_description":"Introduction Often when we are using Microbits we want them to be able to communicate with each other. This can be done easily using the radio menu blocks. Setting the radio group (channel) The first thing we need to set is the group. In the classroom there might be lots of different Microbits sending signals&hellip;&nbsp;Read More &raquo;Communication Between 2 Microbits","og_url":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/","og_site_name":"Stem Robotics","article_modified_time":"2024-02-22T08:59:02+00:00","og_image":[{"url":"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2024\/02\/radio.png?_t=1708591352"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/","url":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/","name":"Communication Between 2 Microbits - Stem Robotics","isPartOf":{"@id":"https:\/\/learnlearn.uk\/stemrobotics\/#website"},"datePublished":"2024-02-21T15:21:30+00:00","dateModified":"2024-02-22T08:59:02+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/stemrobotics\/communication-between-2-microbits\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learnlearn.uk\/stemrobotics\/"},{"@type":"ListItem","position":2,"name":"Communication Between 2 Microbits"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/stemrobotics\/#website","url":"https:\/\/learnlearn.uk\/stemrobotics\/","name":"Stem Robotics LearnLearnuk","description":"","publisher":{"@id":"https:\/\/learnlearn.uk\/stemrobotics\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/stemrobotics\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/stemrobotics\/#organization","name":"Learnlearn","url":"https:\/\/learnlearn.uk\/stemrobotics\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/stemrobotics\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2023\/06\/LearnLearnLogo-Light-Blue.png","contentUrl":"https:\/\/learnlearn.uk\/stemrobotics\/wp-content\/uploads\/sites\/28\/2023\/06\/LearnLearnLogo-Light-Blue.png","width":710,"height":98,"caption":"Learnlearn"},"image":{"@id":"https:\/\/learnlearn.uk\/stemrobotics\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/stemrobotics\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Introduction Often when we are using Microbits we want them to be able to communicate with each other. This can be done easily using the radio menu blocks. Setting the radio group (channel) The first thing we need to set is the group. In the classroom there might be lots of different Microbits sending signals&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/pages\/76"}],"collection":[{"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":6,"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/pages\/76\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/pages\/76\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/stemrobotics\/wp-json\/wp\/v2\/media?parent=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}