{"id":509,"date":"2025-02-12T09:34:56","date_gmt":"2025-02-12T01:34:56","guid":{"rendered":"https:\/\/code.xedulab.com\/?p=509"},"modified":"2025-03-31T13:43:05","modified_gmt":"2025-03-31T05:43:05","slug":"voice-controlled-lights","status":"publish","type":"post","link":"https:\/\/code.xedulab.com\/index.php\/2025\/02\/12\/voice-controlled-lights\/","title":{"rendered":"Voice controlled lights"},"content":{"rendered":"<button class=\"simplefavorite-button has-count preset\" data-postid=\"509\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"1\" style=\"box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;background-color:#ffffff;border-color:#ffffff;color:#686868;\"><i class=\"sf-icon-favorite\" style=\"color:#686868;\"><\/i>\u6536\u85cf<span class=\"simplefavorite-button-count\" style=\"\">1<\/span><\/button>\n<p>1.Teaching objectives (knowledge preparation)<\/p>\n\n\n\n<p>Understand sound intensity sensors.<\/p>\n\n\n\n<p>The automatic switching of RGB lights can be controlled through programming.<\/p>\n\n\n\n<p>Can be combined with real-life application scenarios and project devices.<\/p>\n\n\n\n<p>2.Teaching tasks<\/p>\n\n\n\n<p>Using switch sensors and sound intensity sensors to achieve automatic switching of RGB lights using sound.<\/p>\n\n\n\n<p>3.Preparation of teaching environment and equipment<\/p>\n\n\n\n<p><strong>Equipment Serial Number Table<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Serial number<\/td><td>number<\/td><td>equipment<\/td><td>Specifications<\/td><td>quantity<\/td><\/tr><tr><td>1<\/td><td>&nbsp;<\/td><td>Sound intensity sensor<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><tr><td>2<\/td><td>&nbsp;<\/td><td>RGB lights<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><tr><td>&nbsp;<\/td><td>&nbsp;<\/td><td>&nbsp;<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Software: <\/strong>Smart Code programming software.<\/p>\n\n\n\n<p><strong>Hardware: <\/strong>SMART Code kit: sound intensity sensor, and RGB light.<\/p>\n\n\n\n<p><strong>Detailed List of Structural Components<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Serial number<\/td><td>number<\/td><td>equipment<\/td><td>Specifications<\/td><td>quantity<\/td><\/tr><tr><td>1<\/td><td>&nbsp;<\/td><td>3-hole beam<\/td><td>&nbsp;<\/td><td>12<\/td><\/tr><tr><td>2<\/td><td>&nbsp;<\/td><td>7-hole beam<\/td><td>&nbsp;<\/td><td>4<\/td><\/tr><tr><td>3<\/td><td>&nbsp;<\/td><td>13-hole beam<\/td><td>&nbsp;<\/td><td>4<\/td><\/tr><tr><td>4<\/td><td>&nbsp;<\/td><td>T-shaped beam<\/td><td>&nbsp;<\/td><td>4<\/td><\/tr><tr><td>5<\/td><td>&nbsp;<\/td><td>Black sales<\/td><td>&nbsp;<\/td><td>36<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Note: Materials required to fix a set of sensors: 6 3-hole beams, 2 7-hole beams, 2 13 hole beams, 2 T-shaped beams, and 18 black pins.<\/p>\n\n\n\n<p>4.Project Practice Process<\/p>\n\n\n\n<p>1.<strong>Project Steps<\/strong><\/p>\n\n\n\n<p>2.According to the item list, fix the sound intensity sensor and RGB light.<\/p>\n\n\n\n<p>Use SMART Code programming software to complete programming design.<\/p>\n\n\n\n<p>Use SMART Code software for programming.<\/p>\n\n\n\n<p>Firstly, complete the main program logic. The example code is as follows:<\/p>\n\n\n\n<p>Then, create a variable to obtain the sound intensity sensor value. The example code is as follows:<\/p>\n\n\n\n<p>Then, check the normal ambient sound decibel value on the main controller, obtain the threshold for sound control, and control the RGB lights to turn on and off. The example code is as follows:<\/p>\n\n\n\n<p>Finally, complete the entire code. The example code is as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"591\" height=\"682\" src=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-57.png\" alt=\"\" class=\"wp-image-3013\" srcset=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-57.png 591w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-57-260x300.png 260w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/figure>\n\n\n\n<p>3.Optimization and improvement plan.<\/p>\n\n\n\n<p>4.\u00a0Interesting thinking:<\/p>\n\n\n\n<p>3.<strong>Reflection and discussion:<\/strong><\/p>\n\n\n\n<p>Experimental results<\/p>\n\n\n\n<p>Data records: Table 1 and Table 2<\/p>\n\n\n\n<p>Experimental conclusion:<\/p>\n\n\n\n<p>5.Extension and Expansion<\/p>\n\n\n\n<p>Reflection and exploration:<\/p>\n\n\n\n<p>Question 1:<\/p>\n\n\n\n<p>Question 2:<\/p>\n\n\n\n<p><\/p>\n<button class=\"simplefavorite-button has-count preset\" data-postid=\"509\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"1\" style=\"box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none;background-color:#ffffff;border-color:#ffffff;color:#686868;\"><i class=\"sf-icon-favorite\" style=\"color:#686868;\"><\/i>\u6536\u85cf<span class=\"simplefavorite-button-count\" style=\"\">1<\/span><\/button>","protected":false},"excerpt":{"rendered":"<p>\u6536\u85cf1 1.Teaching objectives (knowledge preparation) Under&#8230;<\/p>\n","protected":false},"author":16,"featured_media":3014,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86],"tags":[],"class_list":["post-509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-environment"],"_links":{"self":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":4,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":3016,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/509\/revisions\/3016"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/media\/3014"}],"wp:attachment":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/categories?post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/tags?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}