{"id":894,"date":"2020-01-09T14:23:24","date_gmt":"2020-01-09T14:23:24","guid":{"rendered":"https:\/\/netlab.com.ph\/?p=894"},"modified":"2020-01-09T14:23:24","modified_gmt":"2020-01-09T14:23:24","slug":"controlling-individual-onboard-led","status":"publish","type":"post","link":"https:\/\/netlab.com.ph\/?p=894","title":{"rendered":"Controlling individual onboard LED"},"content":{"rendered":"\n<p>Each LED on the microbit can be identified by its x and y coordinates as shown on the image below: <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2020\/01\/red.jpg\" alt=\"\" class=\"wp-image-895\" \/><figcaption>x and y coordinate values<\/figcaption><\/figure><\/div>\n\n\n\n<p>To turn on and off the LEDs, use the plot and unplot&nbsp; blocks under the Led category of the Block Editor. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2020\/01\/plot.jpg\" alt=\"\" class=\"wp-image-896\" \/><\/figure>\n\n\n\n<p>Turn on the specified LED using x and y coordinates (x is horizontal, y is vertical). <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2020\/01\/unplot.jpg\" alt=\"\" class=\"wp-image-897\" \/><\/figure>\n\n\n\n<p>Turn off the specified LED using x and y coordinates (x is\nhorizontal, y is vertical).<\/p>\n\n\n\n<p>As an example, the following program will lit the central led at coordinates (2,2) then blink in a loop with a pause of 500 ms.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2020\/01\/blink_central.jpg\" alt=\"\" class=\"wp-image-898\" \/><\/figure>\n\n\n\n<p>The next program blinks the middle LED from top to bottom in a loop.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2020\/01\/racing_led.gif\" alt=\"\" class=\"wp-image-899\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2020\/01\/racing_led-300x1024.jpg\" alt=\"\" class=\"wp-image-900\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Each LED on the microbit can be identified by its x and y coordinates as shown on the image below: To turn on and off the LEDs, use the plot and unplot&nbsp; blocks under the Led category of the Block <a href=\"https:\/\/netlab.com.ph\/?p=894\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-894","post","type-post","status-publish","format-standard","hentry","category-microbit"],"_links":{"self":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/posts\/894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=894"}],"version-history":[{"count":0,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/posts\/894\/revisions"}],"wp:attachment":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}