{"id":17385,"date":"2021-12-23T00:00:32","date_gmt":"2021-12-22T16:00:32","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=17385"},"modified":"2022-03-07T16:05:56","modified_gmt":"2022-03-07T08:05:56","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8arduino%e5%88%9b%e5%bb%ba%e6%91%a9%e5%b0%94%e6%96%af%e7%94%b5%e7%a0%81%e7%94%9f%e6%88%90%e5%99%a8","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/engineer\/how-tos\/arduino\/how-to-create-a-morse-code-generator-using-arduino","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Arduino\u521b\u5efa\u6469\u5c14\u65af\u7535\u7801\u751f\u6210\u5668"},"content":{"rendered":"<div class=\"the_content_wrapper\">\n\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e<a href=\"https:\/\/www.deviceplus.com\/\">DevicePlus.com<\/a>\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5bf9\u79d8\u5bc6\u4fe1\u606f\u611f\u5174\u8da3\uff0c\u90a3\u4e48\u5bf9\u60a8\u6765\u8bf4\u6469\u5c14\u65af\u7535\u7801\u5c06\u4f1a\u662f\u4e00\u79cd\u6709\u8da3\u7684\u4ea4\u6d41\u65b9\u5f0f\u3002\u7136\u800c\uff0c\u6469\u5c14\u65af\u7535\u7801\u7684\u7279\u6027\u4f7f\u5176\u975e\u5e38\u9002\u5408\u4e8e\u901a\u8fc7Arduino\u6765\u7f16\u5199\u548c\u751f\u6210\u6d88\u606f\u3002\u5728\u672c\u6307\u5357\u4e2d\uff0c\u6211\u4eec\u5c06\u5411\u60a8\u5c55\u793a\u5982\u4f55\u521b\u5efa\u4e00\u79cd\u53ef\u4ee5\u5c06\u60a8\u8f93\u5165\u7684\u6587\u672c\u81ea\u52a8\u8f6c\u6362\u4e3a\u53ef\u542c\u7684\u6469\u5c14\u65af\u7535\u7801\u4fe1\u606f\u7684\u8bbe\u5907\u3002<\/p>\n<h3>\u6469\u5c14\u65af\u7535\u7801\u5de5\u4f5c\u539f\u7406<\/h3>\n<p>\u6469\u5c14\u65af\u7535\u7801\u53d1\u660e\u4e8e19\u4e16\u7eaa\uff0c\u4f7f\u7528\u975e\u5e38\u7b80\u5355\u7684\u957f\u77ed\u8109\u51b2\u5e8f\u5217\uff08\u901a\u5e38\u4e3a\u7535\u548c\u5212\uff09\u6765\u8fdc\u8ddd\u79bb\u53d1\u9001\u6d88\u606f\u3002\u901a\u8fc7\u5c06\u5b57\u6bcd\u8868\u4e2d\u7684\u5b57\u6bcd\u7f16\u7801\u4e3a\u7535\u548c\u5212\u7684\u7ec4\u5408\uff0c\u4fe1\u606f\u53ef\u4ee5\u53ea\u7528\u4e00\u4e2a\u5355\u4e00\u7684\u7535\u5b50\u6216\u58f0\u97f3\u4fe1\u53f7\u6765\u8868\u8fbe\u3002<\/p>\n<p>\u4e3a\u4e86\u8bf4\u660e\u8fd9\u662f\u5982\u4f55\u5de5\u4f5c\u7684\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u8702\u9e23\u5668\u5c06\u6587\u672c\u8f6c\u6362\u4e3a\u53ef\u542c\u7684\u6469\u5c14\u65af\u7535\u7801\u4fe1\u53f7\u3002\u901a\u8fc7\u4f7f\u7528Arduino IDE\u4e2d\u7684\u4e32\u884c\u76d1\u89c6\u5668\uff0c\u60a8\u5728\u8ba1\u7b97\u673a\u4e0a\u8f93\u5165\u7684\u4fe1\u606f\u53ef\u4ee5\u88ab\u8f6c\u6362\u4e3a\u6469\u5c14\u65af\u7535\u7801\u97f3\u8c03\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u53ea\u9700\u8981\u8fdb\u884c\u5c11\u91cf\u4fee\u6539\uff0c\u540c\u6837\u7684\u65b9\u6cd5\u5c31\u53ef\u4ee5\u7528\u4e8e\u901a\u8fc7LED\u4f20\u8fbe\u4fe1\u606f\uff0c\u56e0\u4e3a\u8fd9\u4e24\u79cd\u8bbe\u5907\u90fd\u53ef\u4ee5\u88ab\u5feb\u901f\u6253\u5f00\u548c\u5173\u95ed\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9982\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse1.png\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse1.png 675w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse1-233x300.png 233w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse1-113x146.png 113w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse1-39x50.png 39w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse1-58x75.png 58w\" alt=\"\" width=\"675\" height=\"870\" \/><\/p>\n<h3>\u6240\u9700\u7ec4\u4ef6<\/h3>\n<p>\u5728\u786c\u4ef6\u65b9\u9762\uff0c\u60a8\u4e0d\u9700\u8981\u592a\u591a\u7ec4\u4ef6\u6765\u5b8c\u6210\u8be5\u9879\u76ee\u5de5\u4f5c\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u662f\u7f16\u7801\u65b0\u624b\uff0c\u90a3\u4e48\u60a8\u53ef\u80fd\u4f1a\u5e0c\u671b\u80fd\u591f\u5206\u5757\u8fdb\u884c\u8be5\u9879\u76ee\u3002\u8fd9\u4e0d\u662f\u5f88\u590d\u6742\u7684\u4ee3\u7801\uff0c\u4f46\u662f\u60a8\u9700\u8981\u4e86\u89e3<a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/variables\/data-types\/array\/\">\u6570\u7ec4<\/a> \u548c <a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/structure\/control-structure\/switchcase\/\">switch cases \u8bed\u53e5<\/a>\u7684\u5de5\u4f5c\u539f\u7406\u3002\u8bf7\u8bb0\u4f4f\u8981\u70b9\uff0c\u7136\u540e\u8fdb\u884c\u63a5\u4e0b\u6765\u7684\u5de5\u4f5c\u3002<\/p>\n<p>\u60a8\u9700\u8981\u7684\u7269\u7406\u7ec4\u4ef6\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<table width=\"495\">\n<tbody>\n<tr>\n<td width=\"216\"><a href=\"https:\/\/store.arduino.cc\/arduino-uno-rev3\"><strong>Arduino Uno<\/strong><\/a><\/td>\n<td width=\"279\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9983\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse2.png\" sizes=\"auto, (max-width: 267px) 100vw, 267px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse2.png 267w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse2-206x146.png 206w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse2-50x35.png 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse2-106x75.png 106w\" alt=\"\" width=\"267\" height=\"189\" \/><\/td>\n<\/tr>\n<tr>\n<td width=\"216\"><strong>\u4e00\u4e2a<\/strong><a href=\"https:\/\/uk.rs-online.com\/web\/p\/breadboards\/8352716\/\"><strong>\u9762\u5305\u677f<\/strong><\/a><\/td>\n<td width=\"279\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9984\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse3.png\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse3.png 369w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse3-221x300.png 221w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse3-108x146.png 108w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse3-37x50.png 37w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse3-55x75.png 55w\" alt=\"\" width=\"369\" height=\"500\" \/><\/td>\n<\/tr>\n<tr>\n<td width=\"216\"><a href=\"https:\/\/www.arduino.cc\/en\/main\/software\"><strong>Arduino IDE<\/strong><\/a><\/td>\n<td width=\"279\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9985\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse4.png\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse4.png 464w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse4-300x102.png 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse4-260x89.png 260w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse4-50x17.png 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse4-150x51.png 150w\" alt=\"\" width=\"464\" height=\"158\" \/><\/td>\n<\/tr>\n<tr>\n<td width=\"216\"><strong>\u4e00\u4e2a<\/strong><a href=\"https:\/\/uk.rs-online.com\/web\/p\/piezo-buzzer-components\/6173097\/\"><strong>\u8702\u9e23\u5668<\/strong><\/a><\/td>\n<td width=\"279\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-9986\" src=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse5.png\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" srcset=\"https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse5.png 709w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse5-300x241.png 300w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse5-182x146.png 182w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse5-50x40.png 50w, https:\/\/www.deviceplus.com\/wp-content\/uploads\/2020\/11\/morse5-93x75.png 93w\" alt=\"\" width=\"709\" height=\"570\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u60a8\u8fd8\u9700\u8981\u4e00\u4e9b\u6807\u51c6\u7535\u7ebf\u3002<\/p>\n<p>\u5927\u591a\u6570\u5165\u95e8\u7535\u5b50\u5957\u4ef6\u90fd\u5e26\u6709\u6211\u4eec\u4e0a\u9762\u5217\u51fa\u7684\u6240\u6709\u90e8\u4ef6\uff0c\u6240\u4ee5\u5982\u679c\u60a8\u6709\u4e00\u4e2a\u5957\u4ef6\uff0c\u8bf7\u5728\u5f00\u59cb\u8fd9\u4e2a\u9879\u76ee\u524d\u67e5\u770b\u662f\u5426\u5177\u6709\u8fd9\u4e9b\u7ec4\u4ef6\u3002<\/p>\n<h3>\u63a5\u7ebf<\/h3>\n<p>\u8fd9\u4e2a\u9879\u76ee\u7684\u63a5\u7ebf\u5341\u5206\u7b80\u5355\u3002\u672c\u9879\u76ee\u4e2d\u6240\u5177\u6709\u7684\u529f\u80fd\u5927\u90e8\u5206\u90fd\u901a\u8fc7\u4ee3\u7801\u6765\u5b9e\u73b0\uff0c\u6240\u4ee5\u6211\u4eec\u4e0d\u7528\u5c06\u63a5\u7ebf\u8003\u8651\u5728\u5185\u3002\u5728\u63a5\u7ebf\u90e8\u5206\uff0c\u8bf7\u5c06\u8702\u9e23\u5668\u7684\u7535\u6e90\u7ebf\u8fde\u63a5\u5230\u5f15\u811a8\uff0c\u7136\u540e\u5c06\u8702\u9e23\u5668\u7684\u5730\u7ebf\u8fde\u63a5\u5230GND\u3002<\/p>\n<p>\u8fd9\u6837\u5c31\u5b8c\u6210\u4e86\uff01\u8fd9\u5f88\u7b80\u5355\u3002\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u7ee7\u7eed\u8fdb\u884c\u4ee3\u7801\u90e8\u5206\u3002<\/p>\n<h3>\u4ee3\u7801<\/h3>\n<p>\u8fd9\u4e2a\u9879\u76ee\u7684\u4ee3\u7801\u53ef\u80fd\u6bd4\u60a8\u4ee5\u5f80\u770b\u5230\u7684\u8981\u957f\uff0c\u4e3b\u8981\u662f\u56e0\u4e3a\u9700\u8981\u5bf9\u6469\u5c14\u65af\u7535\u7801\u8109\u51b2\u8fdb\u884c\u7f16\u7801\u3002\u4e0d\u8fc7\u4e0d\u8981\u592a\u62c5\u5fc3\u3002\u4e00\u65e6\u60a8\u628a\u5b83\u5206\u89e3\u5f00\u6765\uff0c\u5c31\u4f1a\u53d1\u73b0\u5404\u90e8\u5206\u90fd\u662f\u5f88\u57fa\u7840\u7684\u4ee3\u7801\u3002\u9996\u5148\uff0c\u4ee5\u4e0b\u662f\u60a8\u53ef\u4ee5\u76f4\u63a5\u4e0a\u4f20\u5230Arduino\u7684\u5b8c\u6574\u4ee3\u7801\u3002<\/p>\n<p><span style=\"color: #3366ff;\">int buzzer = 8; \/\/ Assign buzzer to pin 8<\/span><br \/>\n<span style=\"color: #3366ff;\">int note = 1000; \/\/ Set the pitch for the buzzer tone<\/span><\/p>\n<p><span style=\"color: #3366ff;\">int timeUnit = 100; \/\/ This variable will be used to measure dots, dashes, breaks, and pauses<\/span><br \/>\n<span style=\"color: #3366ff;\">char input; \/\/ Variable to save the input to<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void setup () {<\/span><br \/>\n<span style=\"color: #3366ff;\">Serial.begin(9600);\/\/for the connect with the boared<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void loop () {<\/span><br \/>\n<span style=\"color: #3366ff;\">if (Serial.available()) {<\/span><br \/>\n<span style=\"color: #3366ff;\">input = Serial.read();\/\/read the input<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018a\u2019 || input == \u2018A\u2019) {lA();}\/\/if the input is a or A go to function lA<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018b\u2019 || input == \u2018B\u2019) {lB();}\/\/same but with b letter<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018c\u2019 || input == \u2018C\u2019) {lC();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018d\u2019 || input == \u2018D\u2019) {lD();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018e\u2019 || input == \u2018E\u2019) {lE();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018f\u2019 || input == \u2018F\u2019) {lF();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018g\u2019 || input == \u2018G\u2019) {lG();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018h\u2019 || input == \u2018H\u2019) {lH();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018i\u2019 || input == \u2018I\u2019) {lI();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018j\u2019 || input == \u2018J\u2019) {lJ();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018k\u2019 || input == \u2018K\u2019) {lK();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018l\u2019 || input == \u2018L\u2019) {lL();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018m\u2019 || input == \u2018M\u2019) {lM();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018n\u2019 || input == \u2018N\u2019) {lN();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018o\u2019 || input == \u2018O\u2019) {lO();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018p\u2019 || input == \u2018P\u2019) {lP();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018q\u2019 || input == \u2018Q\u2019) {lQ();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018r\u2019 || input == \u2018R\u2019) {lR();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018s\u2019 || input == \u2018S\u2019) {lS();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018t\u2019 || input == \u2018T\u2019) {lT();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018u\u2019 || input == \u2018U\u2019) {lU();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018v\u2019 || input == \u2018V\u2019) {lV();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018w\u2019 || input == \u2018W\u2019) {lW();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018x\u2019 || input == \u2018X\u2019) {lX();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018y\u2019 || input == \u2018Y\u2019) {lY();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018z\u2019 || input == \u2018Z\u2019) {lZ();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018 \u2018) {wordPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">Serial.println (input);<\/span><\/p>\n<p><span style=\"color: #3366ff;\">}<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><br \/>\n<span style=\"color: #3366ff;\">\/\/Letter functions<\/span><br \/>\n<span style=\"color: #3366ff;\">void lA () {dot();dash();letterPause();}\/\/letter A in morse code!<\/span><br \/>\n<span style=\"color: #3366ff;\">void lB () {dash();dot();dot();dot();letterPause();}\/\/same for B<\/span><br \/>\n<span style=\"color: #3366ff;\">void lC () {dash();dot();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lD () {dash();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lE () {dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lF () {dot();dot();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lG () {dash();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lH () {dot();dot();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lI () {dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lJ () {dot();dash();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lK () {dash();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lL () {dot();dash();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lM () {dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lN () {dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lO () {dash();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lP () {dot();dash();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lQ () {dash();dash();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lR () {dot();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lS () {dot();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lT () {dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lU () {dot();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lV () {dot();dot();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lW () {dot();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lX () {dash();dot();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lY () {dash();dot();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lZ () {dash();dash();dot();dot();letterPause();}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void dot() \/\/Emit sound for 100 milliseconds<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">tone(buzzer, note, timeUnit);<\/span><br \/>\n<span style=\"color: #3366ff;\">delay(timeUnit * 2);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void dash() \/\/Emit sound for 300 milliseconds<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">tone(buzzer, note, timeUnit * 3);<\/span><br \/>\n<span style=\"color: #3366ff;\">delay(timeUnit * 4);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void letterPause() \/\/Delay between letters for 300 milliseconds<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">delay(timeUnit * 3);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void wordPause()<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">delay (timeUnit * 7);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e0b\u8fd9\u6bb5\u4ee3\u7801\u7684\u91cd\u8981\u90e8\u5206\uff0c\u4ece\u4e00\u4e9b\u57fa\u672c\u8bbe\u7f6e\u5f00\u59cb\u3002<\/p>\n<p><span style=\"color: #3366ff;\">int buzzer = 8; \/\/ Assign buzzer to pin 8<\/span><br \/>\n<span style=\"color: #3366ff;\">int note = 1000; \/\/ Set the pitch for the buzzer tone<\/span><\/p>\n<p><span style=\"color: #3366ff;\">int timeUnit = 100; \/\/ This variable will be used to measure dots, dashes, breaks, and pauses<\/span><br \/>\n<span style=\"color: #3366ff;\">char input; \/\/ Variable to save the input to<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void setup () {<\/span><br \/>\n<span style=\"color: #3366ff;\">Serial.begin(9600);\/\/for the connect with the boared<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p>\u5728\u8fd9\u4e00\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u521d\u59cb\u5316\u5f15\u811a8\u4e0a\u7684\u8702\u9e23\u5668\uff0c\u5e76\u786e\u5b9a\u8702\u9e23\u5668\u53d1\u51fa\u7684\u97f3\u8c03\u6240\u5bf9\u5e94\u7684\u97f3\u7b26\u53d8\u91cf\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u7ed9\u4ee3\u8868\u6301\u7eed\u65f6\u95f4\u7684\u53d8\u91cftimeUnit\u8d4b\u503c100\u6beb\u79d2\uff0c\u8fd9\u5c06\u7528\u4e8e\u786e\u5b9a\u6240\u6709\u4fe1\u606f\u7684\u6301\u7eed\u65f6\u95f4\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u70b9\u662f\u4e00\u4e2a\u65f6\u95f4\u5355\u4f4d\uff0c\u800c\u4e00\u4e2a\u5212\u662f\u4e09\u4e2a\u65f6\u95f4\u5355\u4f4d\u3002\u6211\u4eec\u8fd8\u5c06\u4f7f\u7528\u5b83\u6765\u8bbe\u7f6e\u4e00\u4e2a\u5b57\u6bcd\u4e2d\u7b26\u53f7\u4e4b\u95f4\u7684\u65f6\u95f4\u95f4\u9694\uff08\u4e00\u4e2a\u5355\u4f4d\uff09\u3001\u4e24\u4e2a\u5b57\u6bcd\u4e4b\u95f4\u7684\u65f6\u95f4\u95f4\u9694\uff08\u4e09\u4e2a\u5355\u4f4d\uff09\u548c\u4e24\u4e2a\u5355\u8bcd\u4e4b\u95f4\u7684\u65f6\u95f4\u95f4\u9694\uff08\u4e03\u4e2a\u5355\u4f4d\uff09\u3002<\/p>\n<p>\u5728setup()\u90e8\u5206\uff0c\u6211\u4eec\u8fd8\u5c06\u521d\u59cb\u5316\u4e32\u884c\u76d1\u89c6\u5668\uff0c\u8fd9\u6837\u7684\u8bdd\u60a8\u5c31\u53ef\u4ee5\u8f93\u5165\u8981\u53d1\u9001\u5230Arduino\u7684\u4fe1\u606f\u4e86\u3002\u8fd9\u8981\u6c42\u60a8\u7684\u9879\u76ee\u9700\u8981\u901a\u8fc7USB\u4fdd\u6301\u4e0e\u8ba1\u7b97\u673a\u4e4b\u95f4\u7684\u8fde\u63a5\u3002<\/p>\n<p><span style=\"color: #3366ff;\">void loop () {<\/span><br \/>\n<span style=\"color: #3366ff;\">if (Serial.available()) {<\/span><br \/>\n<span style=\"color: #3366ff;\">input = Serial.read();\/\/read the input<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018a\u2019 || input == \u2018A\u2019) {lA();}\/\/if the input is a or A go to function lA<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018b\u2019 || input == \u2018B\u2019) {lB();}\/\/same but with b letter<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018c\u2019 || input == \u2018C\u2019) {lC();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018d\u2019 || input == \u2018D\u2019) {lD();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018e\u2019 || input == \u2018E\u2019) {lE();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018f\u2019 || input == \u2018F\u2019) {lF();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018g\u2019 || input == \u2018G\u2019) {lG();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018h\u2019 || input == \u2018H\u2019) {lH();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018i\u2019 || input == \u2018I\u2019) {lI();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018j\u2019 || input == \u2018J\u2019) {lJ();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018k\u2019 || input == \u2018K\u2019) {lK();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018l\u2019 || input == \u2018L\u2019) {lL();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018m\u2019 || input == \u2018M\u2019) {lM();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018n\u2019 || input == \u2018N\u2019) {lN();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018o\u2019 || input == \u2018O\u2019) {lO();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018p\u2019 || input == \u2018P\u2019) {lP();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018q\u2019 || input == \u2018Q\u2019) {lQ();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018r\u2019 || input == \u2018R\u2019) {lR();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018s\u2019 || input == \u2018S\u2019) {lS();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018t\u2019 || input == \u2018T\u2019) {lT();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018u\u2019 || input == \u2018U\u2019) {lU();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018v\u2019 || input == \u2018V\u2019) {lV();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018w\u2019 || input == \u2018W\u2019) {lW();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018x\u2019 || input == \u2018X\u2019) {lX();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018y\u2019 || input == \u2018Y\u2019) {lY();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018z\u2019 || input == \u2018Z\u2019) {lZ();}<\/span><br \/>\n<span style=\"color: #3366ff;\">if (input == \u2018 \u2018) {wordPause();}\/\/the space<\/span><br \/>\n<span style=\"color: #3366ff;\">Serial.println (input);\/\/print the latter saved in the input var<\/span><\/p>\n<p><span style=\"color: #3366ff;\">}<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p>\u5728\u8fd9\u90e8\u5206\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5c06\u4f9d\u6b21\u8bfb\u53d6\u8fdb\u5165\u4e32\u884c\u76d1\u89c6\u5668\u7684\u5b57\u6bcd\uff0c\u5e76\u7acb\u5373\u8fd0\u884c\u4e0b\u9762\u76f8\u5e94\u7684\u51fd\u6570\u3002\u6bcf\u884c\u7528\u6765\u786e\u5b9a\u8f93\u5165\u5b57\u6bcd\u7684\u5927\u5c0f\u5199\u7248\u672c\uff08\u6469\u5c14\u65af\u7535\u7801\u4e2d\u6ca1\u6709\u5927\u5c0f\u5199\u533a\u5206\uff09\uff0c\u6216\u8005\u884c\u4e2d\u662f\u5426\u6709\u7a7a\u683c\u3002\u6839\u636e\u6536\u5230\u7684\u5b57\u6bcd\u4fe1\u606f\uff0c\u4ee3\u7801\u5c06\u8c03\u7528\u5bf9\u5e94\u8be5\u5b57\u6bcd\u7684\u51fd\u6570\u3002<\/p>\n<p><span style=\"color: #3366ff;\">\/\/Letter functions<\/span><br \/>\n<span style=\"color: #3366ff;\">void lA () {dot();dash();letterPause();}\/\/letter A in morse code!<\/span><br \/>\n<span style=\"color: #3366ff;\">void lB () {dash();dot();dot();dot();letterPause();}\/\/same for B<\/span><br \/>\n<span style=\"color: #3366ff;\">void lC () {dash();dot();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lD () {dash();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lE () {dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lF () {dot();dot();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lG () {dash();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lH () {dot();dot();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lI () {dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lJ () {dot();dash();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lK () {dash();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lL () {dot();dash();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lM () {dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lN () {dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lO () {dash();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lP () {dot();dash();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lQ () {dash();dash();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lR () {dot();dash();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lS () {dot();dot();dot();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lT () {dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lU () {dot();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lV () {dot();dot();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lW () {dot();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lX () {dash();dot();dot();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lY () {dash();dot();dash();dash();letterPause();}<\/span><br \/>\n<span style=\"color: #3366ff;\">void lZ () {dash();dash();dot();dot();letterPause();}<\/span><\/p>\n<p>\u5728main loop()\u4e4b\u5916\u7684\u90e8\u5206\uff0c\u6211\u4eec\u5c06\u4e3a\u6bcf\u4e2a\u5b57\u6bcd\u5b9a\u4e49\u51fd\u6570\u3002\u5728\u8fd9\u4e00\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u6839\u636e\u56fd\u9645\u6469\u5c14\u65af\u7535\u7801\u6807\u51c6\u4e3a\u6bcf\u4e2a\u5b57\u6bcd\u6dfb\u52a0\u6a21\u677f\u3002\u4e3a\u7b80\u5355\u8d77\u89c1\uff0c\u6211\u4eec\u5c06\u4f7f\u7528dot()\u3001dash()\u548cletterPause()\u51fd\u6570\u6765\u521b\u5efa\u6a21\u677f\uff0c\u5e76\u5728\u7a0d\u540e\u5b9a\u4e49\u8fd9\u4e9b\u51fd\u6570\u7684\u4f5c\u7528\u3002\u6bcf\u4e2a\u547d\u4ee4\u7528\u5206\u53f7\u5206\u9694\u5f00\u5373\u53ef\uff0c\u4f46\u662f\u4e3a\u4e86\u4f7f\u4ee3\u7801\u66f4\u6e05\u695a\uff0c\u6211\u4eec\u5c06\u6bcf\u4e2a\u51fd\u6570\u5355\u72ec\u653e\u5230\u4e00\u884c\u4e2d\u3002<\/p>\n<p><span style=\"color: #3366ff;\">void dot() \/\/Emit sound for 100 milliseconds<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">tone(buzzer, note, timeUnit);<\/span><br \/>\n<span style=\"color: #3366ff;\">delay(timeUnit * 2);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void dash() \/\/Emit sound for 300 milliseconds<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">tone(buzzer, note, timeUnit * 3);<\/span><br \/>\n<span style=\"color: #3366ff;\">delay(timeUnit * 4);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void letterPause() \/\/Delay between letters for 300 milliseconds<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">delay(timeUnit * 3);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p><span style=\"color: #3366ff;\">void wordPause()<\/span><br \/>\n<span style=\"color: #3366ff;\">{<\/span><br \/>\n<span style=\"color: #3366ff;\">delay (timeUnit * 7);<\/span><br \/>\n<span style=\"color: #3366ff;\">}<\/span><\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u5b9a\u4e49\u5728\u4e0a\u4e00\u90e8\u5206\u4e2d\u4f7f\u7528\u7684\u51fd\u6570\u3002\u9996\u5148\uff0cdot()\u7528\u4e8e\u64ad\u653e\u6211\u4eec\u5728\u6700\u4e0a\u9762\u4ee3\u7801\u4e2d\u6240\u6307\u5b9a\u7684\u58f0\u97f3\u4e00\u4e2a\u65f6\u95f4\u5355\u4f4d\u3002\u867d\u7136tone()\u547d\u4ee4\u53ef\u4ee5\u64ad\u653e\u4e00\u4e2a\u65f6\u95f4\u5355\u4f4d\u7684\u58f0\u97f3\uff0c\u4f46\u662f\u5982\u679c\u8fc7\u65e9\u5728\u6b64\u8c03\u7528\u8be5\u51fd\u6570\uff0c\u53ef\u80fd\u4f1a\u53d1\u751f\u62a2\u5360\uff0c\u56e0\u6b64\u6211\u4eec\u5c06\u6dfb\u52a0\u4e00\u4e2adelay()\u547d\u4ee4\uff0c\u4ee5\u9632\u6b62\u8349\u56fe\u5728\u4e24\u4e2a\u65f6\u95f4\u5355\u4f4d\u5185\u79fb\u52a8\u5230\u4e0b\u4e00\u884c\u4ee3\u7801\u3002\u4e3a\u4ec0\u4e48\u662f\u4e24\u4e2a\u65f6\u95f4\u5355\u4f4d\uff1f\u56e0\u4e3a\u5982\u6b64\u4e00\u6765\uff0ctone()\u53ef\u4ee5\u5728\u7b2c\u4e00\u4e2a\u65f6\u95f4\u5355\u4f4d\u5b8c\u6210\u547d\u4ee4\u7684\u8fd0\u884c\uff0c\u7136\u540e\u5c06\u7b2c\u4e8c\u4e2a\u65f6\u95f4\u5355\u4f4d\u4f5c\u4e3a\u5143\u7d20\u4e4b\u95f4\u7684\u6682\u505c\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5bf9\u4e8e\u7531\u4e00\u4e2a\u70b9\u7ec4\u6210\u7684\u5b57\u6bcd\u201cE\u201d\uff0c\u60a8\u5e94\u8be5\u542c\u5230100\u6beb\u79d2\u7684\u8702\u9e23\u58f0\uff0c\u7136\u540e\u9759\u97f3100\u6beb\u79d2\u3002\u5bf9\u4e8e\u7531\u4e09\u4e2a\u70b9\u7ec4\u6210\u7684\u5b57\u6bcd\u201cS\u201d\uff0c\u60a8\u4f1a\u542c\u5230\u8702\u9e23\uff0c\u9759\u97f3\uff0c\u8702\u9e23\uff0c\u9759\u97f3\uff0c\u8702\u9e23\uff0c\u9759\u97f3\uff0c\u6bcf\u4e2a\u6301\u7eed100\u6beb\u79d2\u3002<\/p>\n<p>\u6211\u4eec\u5728dash()\u547d\u4ee4\u4e2d\u505a\u4e86\u7c7b\u4f3c\u7684\u5de5\u4f5c\uff0c\u4f46\u8fd9\u6b21\u6211\u4eec\u5c06\u64ad\u653e\u4e09\u4e2a\u65f6\u95f4\u5355\u4f4d\uff08300\u6beb\u79d2\uff09\u7684\u58f0\u97f3\uff0c\u7136\u540e\u6682\u505c\u8fd0\u884c\u56db\u4e2a\u65f6\u95f4\u5355\u4f4d\u3002\u4e09\u4e2a\u5355\u4f4d\u8ba9\u58f0\u97f3\u5b8c\u6210\u64ad\u653e\uff0c\u7b2c\u56db\u4e2a\u65f6\u95f4\u5355\u4f4d\u7528\u4e8e\u5143\u7d20\u4e4b\u95f4\u7684\u6682\u505c\u3002<\/p>\n<p>\u6211\u4eec\u8fd8\u5c06\u5b9a\u4e49letterPause() \u548cwordPause()\u51fd\u6570\u3002\u524d\u8005\u5b8c\u5168\u7531\u4e09\u4e2a\u65f6\u95f4\u5355\u4f4d\u5ef6\u8fdf\u7ec4\u6210\uff0c\u5b83\u7528\u4e8e\u5728\u6d88\u606f\u7684\u6bcf\u4e2a\u5b57\u6bcd\u4e4b\u95f4\u8bbe\u7f6e300\u6beb\u79d2\u9759\u97f3\uff0c\u8ba9\u60a8\u53ef\u4ee5\u5c06\u4e0d\u540c\u7684\u5b57\u6bcd\u533a\u5206\u5f00\u6765\u3002\u540e\u8005\u662f\u6700\u957f\u7684\u5ef6\u8fdf\u65f6\u95f4\uff0c\u4e03\u4e2a\u65f6\u95f4\u5355\u4f4d\uff0c\u6216\u8005700\u6beb\u79d2\u3002\u8fd9\u5c06\u5728\u76d1\u89c6\u5668\u8bfb\u53d6\u5230\u4e00\u4e2a\u7a7a\u683c\u65f6\u8fd0\u884c\uff0c\u8868\u660e\u4e00\u4e2a\u65b0\u5355\u8bcd\u7684\u5f00\u59cb\u3002<\/p>\n<p>\u5f53\u60a8\u7684\u8349\u56fe\u4e0a\u4f20\u5b8c\u6210\u5e76\u4e14\u5f00\u59cb\u8fd0\u884cArduino\uff0c\u8bf7\u5728\u60a8\u7684IDE\u7684\u5de5\u5177\u90e8\u5206\u6253\u5f00\u4e32\u884c\u76d1\u89c6\u5668\u3002\u8f93\u5165\u4e00\u4e9b\u5355\u8bcd\u5e76\u6309\u4e0b\u56de\u8f66\u952e\uff0c\u60a8\u5e94\u8be5\u4f1a\u542c\u5230\u8702\u9e23\u5668\u53d1\u51fa\u76f8\u5e94\u7684\u6469\u5c14\u65af\u7535\u7801\u97f3\u8c03\u3002\u5982\u679c\u60a8\u60f3\u81ea\u5df1\u8c03\u6574\u8349\u56fe\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u6dfb\u52a0\u63cf\u8ff0\u6570\u5b57\u7684\u51fd\u6570\u3002<\/p>\n<div class=\"author-box-wrapper\">\n<div class=\"avatar-wrapper\">\n\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/micro.wfjydl.com\/deviceplus\/wp-content\/uploads\/2018\/08\/Device-Plus-logo-for-author-info-75x75.png\" width=\"64\" height=\"64\" alt=\"DevicePlus \u7f16\u8f91\u56e2\u961f\">\n\t<\/div>\n<div class=\"desc-wrapper\">\n<h5>DevicePlus \u7f16\u8f91\u56e2\u961f<\/h5>\n<div class=\"desc\">\n<p>\u8bbe\u5907\u5347\u7ea7\u7248\u9002\u7528\u4e8e\u6240\u6709\u70ed\u7231\u7535\u5b50\u548c\u673a\u7535\u4e00\u4f53\u5316\u7684\u4eba\u3002<\/p>\n<\/div><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8eDevicePlus.com\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002 \u5982\u679c\u60a8\u5bf9\u79d8\u5bc6\u4fe1\u606f\u611f\u5174\u8da3\uff0c\u90a3\u4e48\u5bf9\u60a8\u6765\u8bf4\u6469\u5c14\u65af\u7535\u7801\u5c06\u4f1a\u662f\u4e00\u79cd\u6709\u8da3\u7684\u4ea4\u6d41\u65b9\u5f0f\u3002\u7136\u800c\uff0c\u6469\u5c14\u65af\u7535\u7801\u7684\u7279\u6027\u4f7f\u5176\u975e\u5e38\u9002\u5408\u4e8e\u901a\u8fc7Arduino\u6765\u7f16\u5199\u548c\u751f\u6210\u6d88\u606f\u3002\u5728\u672c\u6307\u5357\u4e2d\uff0c\u6211 [&hellip;]","protected":false},"author":4,"featured_media":17386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1130],"tags":[],"class_list":["post-17385","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/17385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=17385"}],"version-history":[{"count":4,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/17385\/revisions"}],"predecessor-version":[{"id":17390,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/17385\/revisions\/17390"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/17386"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=17385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=17385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=17385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}