{"id":572,"date":"2025-02-18T11:43:15","date_gmt":"2025-02-18T03:43:15","guid":{"rendered":"https:\/\/code.xedulab.com\/?p=572"},"modified":"2025-03-31T13:51:39","modified_gmt":"2025-03-31T05:51:39","slug":"decibel-measuring-instrument-2","status":"publish","type":"post","link":"https:\/\/code.xedulab.com\/index.php\/2025\/02\/18\/decibel-measuring-instrument-2\/","title":{"rendered":"Campus Broadcasting"},"content":{"rendered":"<button class=\"simplefavorite-button has-count preset\" data-postid=\"572\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" 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=\"\">0<\/span><\/button>\n<p>Introduction: A playback device that adjusts volume based on a rotary potentiometer.<\/p>\n\n\n\n<p>Advanced: Sound decibel detection, automatic setting of playback volume.<\/p>\n\n\n\n<p>Advanced: Broadcast timed playback, paired with speeches and events.<\/p>\n\n\n\n<p>Experiment: Currently unavailable..<\/p>\n\n\n\n<p>1.Teaching objectives (knowledge preparation)<\/p>\n\n\n\n<p>Get to know rotary potentiometers, understand the control and usage methods of rotary potentiometers.<\/p>\n\n\n\n<p>Implement the use of a rotary potentiometer to control the volume of the player through programming.<\/p>\n\n\n\n<p>Being able to combine real-life application scenarios and apply project devices to achieve intelligent application scenarios in daily life.<\/p>\n\n\n\n<p>2.Teaching tasks<\/p>\n\n\n\n<p>Build a player that can use a rotary potentiometer to control the volume level.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"963\" height=\"271\" src=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-48.png\" alt=\"\" class=\"wp-image-2986\" srcset=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-48.png 963w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-48-300x84.png 300w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-48-768x216.png 768w\" sizes=\"(max-width: 963px) 100vw, 963px\" \/><\/figure>\n\n\n\n<p>3.Preparation of teaching environment and equipment<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<p>Equipment List: Image (with label number 123456)<\/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>Switch<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><tr><td>2<\/td><td>&nbsp;<\/td><td>MP3 Player<\/td><td>&nbsp;<\/td><td>1<\/td><\/tr><tr><td>3<\/td><td>&nbsp;<\/td><td>Rotary Potentiometer<\/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: Switch\u3001MP3 Player\u3001Rotary Potentiometer.<\/p>\n\n\n\n<p><strong>Other:<\/strong> Several building block devices.<\/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>18<\/td><\/tr><tr><td>2<\/td><td>&nbsp;<\/td><td>7-hole beam<\/td><td>&nbsp;<\/td><td>6<\/td><\/tr><tr><td>3<\/td><td>&nbsp;<\/td><td>13-hole beam<\/td><td>&nbsp;<\/td><td>6<\/td><\/tr><tr><td>4<\/td><td>&nbsp;<\/td><td>T-shaped beam<\/td><td>&nbsp;<\/td><td>6<\/td><\/tr><tr><td>5<\/td><td>&nbsp;<\/td><td>Black sales<\/td><td>&nbsp;<\/td><td>54<\/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>(Summary of Knowledge Points: 1. Components. 2. Program Modules. 3. Program Design)<\/p>\n\n\n\n<p>1.<strong>Project video (in video format)<\/strong><\/p>\n\n\n\n<p>2.<strong>Project Steps<\/strong><\/p>\n\n\n\n<p>Firstly, connect the switch sensor, rotary potentiometer, and MP3 player. Use building block modules to secure equipment.<\/p>\n\n\n\n<p>Then set the number of the music to be played on the MP3 player. Use a rotary potentiometer to set the volume level for playback, with an MP3 volume range of 0 to 30.<\/p>\n\n\n\n<p>Use SMART Code to program and control devices.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<p>Firstly, use the switch statement. When the switch is released, play the music with the number 1 in MP3. Press the switch to stop playing the music. The example code is as follows:<\/p>\n\n\n\n<p>Then, create the main program entrance, obtain the value of the rotary potentiometer, and set the volume of the MP3 player based on the value of the rotary potentiometer. When the rotary potentiometer is less than 50, set the volume to 15; when the rotary potentiometer value is greater than 50, set the volume to 30. (Note: The main program needs to add at least 100ms of delay after each loop.) Example code is as follows:<\/p>\n\n\n\n<p>Finally, complete all the code. The example code is as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"865\" height=\"404\" src=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-49.png\" alt=\"\" class=\"wp-image-2988\" srcset=\"https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-49.png 865w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-49-300x140.png 300w, https:\/\/code.xedulab.com\/wp-content\/uploads\/2025\/02\/image-49-768x359.png 768w\" sizes=\"(max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p>3.Optimization and improvement plan.<\/p>\n\n\n\n<p>4.Interesting thinking: Setting the rotation gear.<\/p>\n\n\n\n<p>3.<strong>Reflection and discussion:<\/strong> <strong>Can we use a rotary potentiometer to start or end campus broadcasting?<\/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=\"572\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" 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=\"\">0<\/span><\/button>","protected":false},"excerpt":{"rendered":"<p>\u6536\u85cf0 Introduction: A playback device that adjusts volume&#8230;<\/p>\n","protected":false},"author":16,"featured_media":2989,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87,82],"tags":[],"class_list":["post-572","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-music","category-robotics"],"_links":{"self":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/572","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=572"}],"version-history":[{"count":4,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/572\/revisions"}],"predecessor-version":[{"id":3022,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/posts\/572\/revisions\/3022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/media\/2989"}],"wp:attachment":[{"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/media?parent=572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/categories?post=572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.xedulab.com\/index.php\/wp-json\/wp\/v2\/tags?post=572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}