{"id":78361,"date":"2026-02-27T09:05:03","date_gmt":"2026-02-27T01:05:03","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/78361.html"},"modified":"2026-02-27T09:05:03","modified_gmt":"2026-02-27T01:05:03","slug":"%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%ef%bc%9a%e6%b7%b1%e5%85%a5%e8%a7%a3%e6%9e%90%e8%93%9d%e7%89%99hc-05%e6%a8%a1%e5%9d%97-%e5%8e%9f%e7%90%86%e3%80%81at%e9%85%8d%e7%bd%ae%e4%b8%8estm3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/78361.html","title":{"rendered":"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236"},"content":{"rendered":"<h3>\u524d\u8a00<\/h3>\n<p>\u5728\u7269\u8054\u7f51&#xff08;IoT&#xff09;\u5165\u95e8\u9879\u76ee\u4e2d&#xff0c;\u65e0\u7ebf\u901a\u4fe1\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\u3002\u84dd\u7259HC-05\u6a21\u5757\u56e0\u5176\u4ef7\u683c\u4f4e\u5ec9\u3001\u4f7f\u7528\u7b80\u5355&#xff08;\u4e32\u53e3\u900f\u4f20&#xff09;&#xff0c;\u6210\u4e3a\u4e86\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u7684\u9996\u9009\u3002\u672c\u6587\u5c06\u5e26\u4f60\u4eceHC-05\u7684\u5de5\u4f5c\u539f\u7406\u51fa\u53d1&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u901a\u8fc7AT\u6307\u4ee4\u914d\u7f6e\u6a21\u5757&#xff0c;\u5e76\u4f7f\u7528STM32CubeMX\u4e0eHAL\u5e93\u5b9e\u73b0\u624b\u673a\u84dd\u7259\u63a7\u5236LED\u706f\u7684\u4eae\u706d\u3002<\/p>\n<hr \/>\n<h3>\u7b2c\u4e00\u90e8\u5206&#xff1a;HC-05\u84dd\u7259\u6a21\u5757\u539f\u7406\u7b80\u8ff0<\/h3>\n<h4>1.1 \u4ec0\u4e48\u662f\u201c\u4e32\u53e3\u900f\u4f20\u201d&#xff1f;<\/h4>\n<p>HC-05\u7684\u6838\u5fc3\u529f\u80fd\u662fSPP&#xff08;Serial Port Profile&#xff09;\u4e32\u53e3\u900f\u4f20\u3002 \u7b80\u5355\u6765\u8bf4&#xff0c;\u5b83\u5c31\u50cf\u4e00\u6839\u65e0\u5f62\u7684\u4e32\u53e3\u7ebf\u3002\u5f53\u5355\u7247\u673a\u5411HC-05\u53d1\u9001\u6570\u636e\u65f6&#xff0c;HC-05\u901a\u8fc7\u65e0\u7ebf\u7535\u6ce2\u53d1\u7ed9\u624b\u673a&#xff1b;\u624b\u673a\u53d1\u6570\u636e\u7ed9HC-05\u65f6&#xff0c;HC-05\u4f1a\u5c06\u5176\u8f6c\u5316\u4e3a\u4e32\u53e3\u4fe1\u53f7\u53d1\u7ed9\u5355\u7247\u673a\u3002<\/p>\n<ul>\n<li>\u5355\u7247\u673a\u89c6\u89d2&#xff1a;\u6211\u53ea\u662f\u5728\u548c\u4e00\u4e2a\u666e\u901a\u7684\u4e32\u53e3\u8bbe\u5907&#xff08;UART&#xff09;\u8bf4\u8bdd\u3002<\/li>\n<li>\u624b\u673a\u89c6\u89d2&#xff1a;\u6211\u8fde\u63a5\u4e86\u4e00\u4e2a\u84dd\u7259\u8bbe\u5907\u3002<\/li>\n<\/ul>\n<h4>1.2 \u4e24\u79cd\u5de5\u4f5c\u6a21\u5f0f<\/h4>\n<p>HC-05\u6709\u4e24\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u72b6\u6001&#xff0c;\u521d\u5b66\u8005\u5bb9\u6613\u6df7\u6dc6&#xff1a;<\/p>\n<li>\u6570\u636e\u4f20\u8f93\u6a21\u5f0f&#xff08;\u6b63\u5e38\u6a21\u5f0f&#xff09;&#xff1a;\n<ul>\n<li>\u6a21\u5757\u4e0a\u7535\u540e&#xff0c;LED\u5feb\u95ea&#xff08;\u672a\u8fde\u63a5&#xff09;\u6216\u53cc\u95ea&#xff08;\u5df2\u8fde\u63a5&#xff09;\u3002<\/li>\n<li>\u6b64\u65f6\u53d1\u9001\u7684\u6570\u636e\u4f1a\u88ab\u76f4\u63a5\u65e0\u7ebf\u4f20\u8f93&#xff0c;\u6a21\u5757\u4e0d\u89e3\u6790AT\u6307\u4ee4\u3002<\/li>\n<\/ul>\n<\/li>\n<li>AT\u6307\u4ee4\u6a21\u5f0f&#xff08;\u914d\u7f6e\u6a21\u5f0f&#xff09;&#xff1a;\n<ul>\n<li>\u6a21\u5757\u4e0a\u7535\u524d\u6309\u4f4f\u6309\u94ae&#xff0c;LED\u6162\u95ea&#xff08;\u7ea62\u79d2\u95ea\u4e00\u6b21&#xff09;\u3002<\/li>\n<li>\u6b64\u65f6\u901a\u8fc7\u4e32\u53e3\u53d1\u9001\u7279\u5b9a\u6307\u4ee4&#xff08;\u5982\u6539\u540d\u3001\u6539\u6ce2\u7279\u7387&#xff09;&#xff0c;\u6a21\u5757\u4f1a\u56de\u590d\u201cOK\u201d&#xff0c;\u4f46\u4e0d\u8fdb\u884c\u65e0\u7ebf\u4f20\u8f93\u3002<\/li>\n<\/ul>\n<\/li>\n<h4>1.3 \u7269\u7406\u63a5\u53e3<\/h4>\n<ul>\n<li>VCC\/GND&#xff1a;\u4f9b\u7535&#xff08;\u901a\u5e383.6V-6V&#xff0c;\u6ce8\u610f\u4fe1\u53f7\u7535\u5e73\u901a\u5e38\u517c\u5bb93.3V&#xff09;\u3002<\/li>\n<li>TXD&#xff1a;\u53d1\u9001\u7aef&#xff0c;\u63a5\u5355\u7247\u673a\u7684RX\u3002<\/li>\n<li>RXD&#xff1a;\u63a5\u6536\u7aef&#xff0c;\u63a5\u5355\u7247\u673a\u7684TX&#xff08;\u9700\u5206\u538b\u6216\u76f4\u63a5\u63a53.3V\u5355\u7247\u673a&#xff09;\u3002<\/li>\n<li>EN\/KEY&#xff1a;\u4f7f\u80fd\/\u6a21\u5f0f\u5207\u6362\u5f15\u811a&#xff08;\u7528\u4e8e\u8fdb\u5165AT\u6a21\u5f0f&#xff09;\u3002<\/li>\n<li>STATE&#xff1a;\u72b6\u6001\u6307\u793a&#xff08;\u8fde\u63a5\u6210\u529f\u8f93\u51fa\u9ad8\u7535\u5e73&#xff0c;\u672a\u8fde\u63a5\u4f4e\u7535\u5e73&#xff09;\u3002<\/li>\n<\/ul>\n<h2>\u7b2c\u4e00\u90e8\u5206 \u6df1\u5ea6\u5256\u6790&#xff1a;\u84dd\u7259\u6280\u672f\u4e0eHC-05\u67b6\u6784\u539f\u7406<\/h2>\n<p>\u5728\u52a8\u624b\u8fde\u7ebf\u4e4b\u524d&#xff0c;\u6211\u4eec\u9700\u8981\u5148\u7406\u89e3\u84dd\u7259&#xff08;Bluetooth&#xff09;\u7a76\u7adf\u662f\u5982\u4f55\u5b9e\u73b0\u65e0\u7ebf\u901a\u4fe1\u7684\u3002HC-05\u4e4b\u6240\u4ee5\u597d\u7528&#xff0c;\u662f\u56e0\u4e3a\u5b83\u5728\u82af\u7247\u5185\u90e8\u5e2e\u6211\u4eec\u5c06\u590d\u6742\u7684\u65e0\u7ebf\u5c04\u9891\u534f\u8bae\u8f6c\u6362\u6210\u4e86\u7b80\u5355\u7684\u4e32\u53e3\u4fe1\u53f7\u3002<\/p>\n<h3>1.1 \u65e0\u7ebf\u7535\u57fa\u7840&#xff1a;2.4GHz ISM\u9891\u6bb5<\/h3>\n<p>\u84dd\u7259\u548cWi-Fi\u4e00\u6837&#xff0c;\u90fd\u5de5\u4f5c\u5728\u00a02.4GHz ISM&#xff08;\u5de5\u4e1a\u3001\u79d1\u5b66\u3001\u533b\u7597&#xff09;\u9891\u6bb5\u3002\u8fd9\u662f\u4e00\u4e2a\u5168\u7403\u901a\u7528\u7684\u514d\u8d39\u9891\u6bb5&#xff0c;\u65e0\u9700\u6388\u6743\u5373\u53ef\u4f7f\u7528\u3002<\/p>\n<ul>\n<li>\u7269\u7406\u5c42&#xff1a;\u84dd\u7259\u901a\u8fc7\u65e0\u7ebf\u7535\u6ce2\u53d1\u9001\u4e8c\u8fdb\u5236\u6570\u636e&#xff08;0\u548c1&#xff09;\u3002<\/li>\n<li>\u6311\u6218&#xff1a;\u65e2\u7136Wi-Fi\u3001\u5fae\u6ce2\u7089\u3001\u65e0\u7ebf\u9f20\u6807\u90fd\u5728\u75282.4GHz&#xff0c;\u84dd\u7259\u4e3a\u4ec0\u4e48\u4e0d\u4f1a\u88ab\u4e25\u91cd\u5e72\u6270&#xff1f;\u8fd9\u5c31\u6d89\u53ca\u5230\u4e86\u84dd\u7259\u7684\u6838\u5fc3\u6280\u672f\u2014\u2014FHSS\u3002<\/li>\n<\/ul>\n<h3>1.2 \u6297\u5e72\u6270\u7684\u6838\u5fc3&#xff1a;FHSS&#xff08;\u8df3\u9891\u6269\u9891\u6280\u672f&#xff09;<\/h3>\n<p>\u8fd9\u662f\u84dd\u7259\u901a\u4fe1\u6700\u7cbe\u5999\u7684\u5730\u65b9\u3002<\/p>\n<ul>\n<li>\u539f\u7406&#xff1a;\u84dd\u7259\u4e0d\u4f1a\u4e00\u76f4\u5360\u7528\u67d0\u4e00\u4e2a\u56fa\u5b9a\u7684\u9891\u7387\u4f20\u8f93\u6570\u636e\u3002\u5b83\u5c062.4GHz\u9891\u6bb5\u5212\u5206\u4e3a79\u4e2a\u4fe1\u9053&#xff08;\u6bcf\u4e2a\u4fe1\u9053\u5e26\u5bbd1MHz&#xff09;\u3002<\/li>\n<li>\u8df3\u9891&#xff1a;\u53d1\u9001\u7aef\u548c\u63a5\u6536\u7aef\u5546\u91cf\u597d\u4e00\u4e2a\u7b97\u6cd5&#xff0c;\u6bcf\u79d2\u949f\u8df3\u53d81600\u6b21\u9891\u7387\u3002\u6bd4\u5982\u8fd9\u4e00\u6beb\u79d2\u5728\u4fe1\u90531\u53d1\u6570\u636e&#xff0c;\u4e0b\u4e00\u6beb\u79d2\u8df3\u5230\u4fe1\u905358&#xff0c;\u518d\u4e0b\u4e00\u6beb\u79d2\u8df3\u5230\u4fe1\u905312\u3002<\/li>\n<li>\u7ed3\u679c&#xff1a;\u5373\u4f7f\u67d0\u4e2a\u9891\u6bb5&#xff08;\u6bd4\u5982\u4fe1\u90535&#xff09;\u6709\u5f88\u5f3a\u7684Wi-Fi\u5e72\u6270&#xff0c;\u84dd\u7259\u4e5f\u53ea\u4f1a\u635f\u5931\u6781\u5c11\u7684\u6570\u636e\u5305&#xff0c;\u5e76\u5728\u4e0b\u4e00\u4e2a\u77ac\u95f4\u8df3\u5230\u5e72\u51c0\u7684\u4fe1\u9053\u7ee7\u7eed\u4f20\u8f93\u3002\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u84dd\u7259\u8fde\u63a5\u5982\u6b64\u7a33\u5b9a\u7684\u539f\u56e0\u3002<\/li>\n<\/ul>\n<h3>1.3 \u7f51\u7edc\u62d3\u6251&#xff1a;\u4e3b\u4ece\u6a21\u5f0f&#xff08;Master-Slave&#xff09;<\/h3>\n<p>\u84dd\u7259\u901a\u4fe1\u5fc5\u987b\u57fa\u4e8e\u4e3b\u4ece\u5173\u7cfb\u5efa\u7acb\u8fde\u63a5&#xff08;Piconet \u5fae\u7f51&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u4e3b\u8bbe\u5907&#xff08;Master&#xff09;&#xff1a;\u53d1\u8d77\u8fde\u63a5\u7684\u8bbe\u5907&#xff0c;\u51b3\u5b9a\u8df3\u9891\u7684\u5e8f\u5217\u548c\u65f6\u949f\u540c\u6b65\u3002\u5728\u6211\u4eec\u7684\u9879\u76ee\u4e2d&#xff0c;\u667a\u80fd\u624b\u673a\u662f\u4e3b\u8bbe\u5907\u3002<\/li>\n<li>\u4ece\u8bbe\u5907&#xff08;Slave&#xff09;&#xff1a;\u7b49\u5f85\u8fde\u63a5\u7684\u8bbe\u5907&#xff0c;\u8ddf\u968f\u4e3b\u8bbe\u5907\u7684\u6307\u4ee4\u8fdb\u884c\u8df3\u9891\u3002\u5728\u6211\u4eec\u7684\u9879\u76ee\u4e2d&#xff0c;HC-05\u6a21\u5757\u662f\u4ece\u8bbe\u5907\u3002<\/li>\n<li>\u5173\u7cfb&#xff1a;\u4e00\u4e2a\u4e3b\u8bbe\u5907\u6700\u591a\u53ef\u4ee5\u540c\u65f6\u8fde\u63a57\u4e2a\u4ece\u8bbe\u5907&#xff0c;\u4f46\u4e00\u4e2a\u4ece\u8bbe\u5907&#xff08;HC-05&#xff09;\u540c\u4e00\u65f6\u95f4\u53ea\u80fd\u8fde\u63a5\u4e00\u4e2a\u4e3b\u8bbe\u5907\u3002<\/li>\n<\/ul>\n<h3>1.4 HC-05\u7684\u201c\u5927\u8111\u201d&#xff1a;SPP\u534f\u8bae\u4e0e\u84dd\u7259\u7248\u672c<\/h3>\n<p>HC-05 \u662f\u4e00\u6b3e\u00a0\u7ecf\u5178\u84dd\u7259&#xff08;Bluetooth Classic&#xff09;\u00a0\u6a21\u5757&#xff0c;\u901a\u5e38\u9075\u5faa\u00a0\u84dd\u7259 2.0 &#043; EDR\u00a0\u6807\u51c6\u3002<\/p>\n<ul>\n<li>\u534f\u8bae\u6808&#xff08;Profile&#xff09;&#xff1a;\u84dd\u7259\u534f\u8bae\u6808\u975e\u5e38\u590d\u6742&#xff0c;\u5305\u542bL2CAP\u3001RFCOMM\u7b49\u5c42\u3002\u4f46HC-05\u53ea\u4e3a\u6211\u4eec\u66b4\u9732\u4e86\u4e00\u4e2a\u6700\u9876\u5c42\u7684\u5e94\u7528\u6587\u4ef6\u2014\u2014SPP&#xff08;Serial Port Profile&#xff0c;\u4e32\u53e3\u914d\u7f6e\u6587\u4ef6&#xff09;\u3002<\/li>\n<li>SPP\u7684\u4f5c\u7528&#xff1a;\u5b83\u7684\u4f5c\u7528\u5c31\u662f\u6a21\u62dfRS-232\u4e32\u53e3\u7ebf\u3002\u5b83\u8ba9\u65e0\u7ebf\u4fe1\u9053\u5728\u4e24\u7aef\u7684\u8bbe\u5907\u770b\u6765&#xff0c;\u5c31\u50cf\u662f\u4e00\u6761\u900f\u660e\u7684\u7535\u7ebf\u3002<\/li>\n<li>\u6ce8\u610f&#xff1a;\u7531\u4e8eHC-05\u662f\u7ecf\u5178\u84dd\u7259&#xff0c;\u5b83\u4e0d\u652f\u6301\u82f9\u679ciOS\u8bbe\u5907\u7684\u76f4\u63a5\u8fde\u63a5&#xff08;iPhone\u901a\u5e38\u53ea\u652f\u6301\u4f4e\u529f\u8017\u84dd\u7259BLE&#xff0c;\u5982HC-08\u6216HC-10&#xff09;\u3002\u5982\u679c\u4f60\u7684\u9879\u76ee\u9700\u8981\u8fdeiPhone&#xff0c;\u9700\u8981\u6362\u7528BLE\u6a21\u5757&#xff0c;\u4f46\u539f\u7406\u7c7b\u4f3c\u3002<\/li>\n<\/ul>\n<h3>1.5 \u786c\u4ef6\u5185\u90e8\u67b6\u6784<\/h3>\n<p>\u5265\u5f00HC-05\u7684\u84dd\u8272\u70ed\u7f29\u7ba1&#xff0c;\u4f60\u4f1a\u770b\u5230\u4e24\u90e8\u5206\u6838\u5fc3\u7535\u8def&#xff1a;<\/p>\n<li>CSR BC417\u82af\u7247&#xff1a;\u8fd9\u662f\u6838\u5fc3\u84dd\u7259\u82af\u7247&#xff0c;\u8d1f\u8d23\u5c04\u9891\u53d1\u9001\u3001FHSS\u8df3\u9891\u7b97\u6cd5\u3001\u57fa\u5e26\u5904\u7406\u3002\u5b83\u5185\u90e8\u5176\u5b9e\u8dd1\u7740\u4e00\u5957\u590d\u6742\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u3002<\/li>\n<li>Flash\u5b58\u50a8\u5668&#xff1a;\u5b58\u50a8\u4e86CSR\u82af\u7247\u7684\u56fa\u4ef6\u548c\u914d\u7f6e\u4fe1\u606f&#xff08;\u6211\u4eec\u7528AT\u6307\u4ee4\u4fee\u6539\u7684\u540d\u5b57\u548c\u5bc6\u7801\u5c31\u5b58\u5728\u8fd9\u91cc&#xff09;\u3002<\/li>\n<li>\u5e95\u677f\u7535\u8def&#xff1a;\u7531\u4e8eCSR\u82af\u7247\u5de5\u4f5c\u7535\u538b\u662f3.3V\u4e14\u5f15\u811a\u5fae\u5c0f&#xff0c;\u6211\u4eec\u4e70\u5230\u7684HC-05\u6a21\u5757\u5e26\u6709\u4e00\u4e2a\u7eff\u8272\u5e95\u677f&#xff0c;\u4e0a\u9762\u6709LDO&#xff08;\u7a33\u538b\u82af\u7247&#xff09;\u5c065V\u8f6c\u4e3a3.3V&#xff0c;\u5e76\u5f15\u51fa\u4e86TX\/RX\/VCC\/GND\u5f15\u811a&#xff0c;\u65b9\u4fbf\u5355\u7247\u673a\u8fde\u63a5\u3002<\/li>\n<hr \/>\n<h3>\u7b2c\u4e8c\u90e8\u5206&#xff1a;HC-05\u7684\u521d\u59cb\u5316\u4e0e\u70e7\u5f55&#xff08;AT\u6307\u4ee4\u914d\u7f6e&#xff09;<\/h3>\n<p>\u5728\u8fde\u63a5STM32\u4e4b\u524d&#xff0c;\u6211\u4eec\u9700\u8981\u5148\u914d\u7f6e\u6a21\u5757\u7684\u6ce2\u7279\u7387\u3001\u540d\u79f0\u548c\u914d\u5bf9\u5bc6\u7801\u3002\u6211\u4eec\u9700\u8981\u4e00\u4e2aUSB\u8f6cTTL\u6a21\u5757&#xff08;\u5982CH340&#xff09;\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"385\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010454-69a0edb6b5834.png\" width=\"492\" \/><\/p>\n<h4>2.1 \u786c\u4ef6\u8fde\u63a5&#xff08;\u8fdb\u5165AT\u6a21\u5f0f&#xff09;<\/h4>\n<li>\u63a5\u7ebf&#xff1a;\n<ul>\n<li>USB-TTL\u00a05V\u00a0-&gt; HC-05\u00a0VCC<\/li>\n<li>USB-TTL\u00a0GND\u00a0-&gt; HC-05\u00a0GND<\/li>\n<li>USB-TTL\u00a0TX\u00a0-&gt; HC-05\u00a0RX<\/li>\n<li>USB-TTL\u00a0RX\u00a0-&gt; HC-05\u00a0TX<\/li>\n<\/ul>\n<\/li>\n<li>\u8fdb\u5165\u65b9\u6cd5&#xff1a;\n<ul>\n<li>\u5148\u6309\u4f4fHC-05\u6a21\u5757\u4e0a\u7684\u5fae\u52a8\u5f00\u5173&#xff08;Button&#xff09;\u4e0d\u653e\u3002<\/li>\n<li>\u7ed9\u6a21\u5757\u4e0a\u7535\u3002<\/li>\n<li>\u770b\u5230LED\u8fdb\u5165\u6162\u95ea\u72b6\u6001&#xff08;\u7ea62\u79d2\u95ea\u4e00\u6b21&#xff09;\u540e&#xff0c;\u677e\u5f00\u6309\u94ae\u3002<\/li>\n<\/ul>\n<\/li>\n<h4>2.2 \u4e32\u53e3\u52a9\u624b\u914d\u7f6e<\/h4>\n<p>\u6253\u5f00\u7535\u8111\u4e0a\u7684\u4e32\u53e3\u8c03\u8bd5\u52a9\u624b&#xff08;\u5982XCOM\u3001SSCOM&#xff09;&#xff1a;\u4e32\u53e3\u52a9\u624b<\/p>\n<ul>\n<li>\u6ce2\u7279\u7387&#xff1a;38400&#xff08;HC-05\u8fdb\u5165AT\u6a21\u5f0f\u7684\u9ed8\u8ba4\u6ce2\u7279\u7387\u901a\u5e38\u662f38400&#xff0c;\u65e0\u8bba\u901a\u4fe1\u6ce2\u7279\u7387\u662f\u591a\u5c11&#xff09;\u3002<\/li>\n<li>\u505c\u6b62\u4f4d\/\u6570\u636e\u4f4d&#xff1a;1\u4f4d\u505c\u6b62\u4f4d&#xff0c;8\u4f4d\u6570\u636e\u4f4d&#xff0c;\u65e0\u6821\u9a8c\u3002<\/li>\n<li>\u53d1\u9001\u8bbe\u7f6e&#xff1a;\u52fe\u9009\u201c\u53d1\u9001\u65b0\u884c\u201d&#xff08;\u53d1\u9001\\\\r\\\\n&#xff09;&#xff0c;\u8fd9\u70b9\u975e\u5e38\u91cd\u8981&#xff0c;\u5426\u5219\u6a21\u5757\u65e0\u54cd\u5e94\u3002<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1284\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010455-69a0edb7e9a2f.png\" width=\"2419\" \/><\/p>\n<h4>2.3 \u5e38\u7528AT\u6307\u4ee4\u5b9e\u6218<\/h4>\n<p>\u5728\u53d1\u9001\u6846\u8f93\u5165\u4ee5\u4e0b\u6307\u4ee4&#xff08;\u4e0d\u533a\u5206\u5927\u5c0f\u5199&#xff09;&#xff1a;<\/p>\n<li>\n<p>\u6d4b\u8bd5\u6307\u4ee4<\/p>\n<ul>\n<li>\u53d1\u9001&#xff1a;AT<\/li>\n<li>\u8fd4\u56de&#xff1a;OK\u00a0&#xff08;\u8bf4\u660e\u8fde\u63a5\u6b63\u5e38&#xff09;<\/li>\n<\/ul>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"291\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010457-69a0edb91f3bc.png\" width=\"375\" \/><\/p>\n<li>\n<p>\u6062\u590d\u51fa\u5382\u8bbe\u7f6e<\/p>\n<ul>\n<li>\u53d1\u9001&#xff1a;AT&#043;ORGL<\/li>\n<li>\u8fd4\u56de&#xff1a;OK<\/li>\n<\/ul>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"277\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010457-69a0edb99084c.png\" width=\"351\" \/><\/p>\n<li>\n<p>\u4fee\u6539\u84dd\u7259\u540d\u79f0<\/p>\n<ul>\n<li>\u53d1\u9001&#xff1a;AT&#043;NAME&#061;MySTM32_BT<\/li>\n<li>\u8fd4\u56de&#xff1a;OK<\/li>\n<\/ul>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"354\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010458-69a0edba19996.png\" width=\"452\" \/><\/p>\n<li>\n<p>\u4fee\u6539\u914d\u5bf9\u5bc6\u7801<\/p>\n<ul>\n<li>\u53d1\u9001&#xff1a;AT&#043;PSWD&#061;1234\u6216\u5219123456&#xff08;\u6709\u7684\u6a21\u5757\u662f\u9ed8\u8ba46\u4f4d\u5bc6\u7801&#xff0c;\u6709\u7684\u9ed8\u8ba44\u4f4d&#xff09;<\/li>\n<li>\u8fd4\u56de&#xff1a;OK<\/li>\n<\/ul>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"329\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010458-69a0edba9baab.png\" width=\"424\" \/><\/p>\n<li>\n<p>\u914d\u7f6e\u901a\u4fe1\u6ce2\u7279\u7387&#xff08;\u91cd\u8981&#xff01;&#xff09;<\/p>\n<ul>\n<li>\u53d1\u9001&#xff1a;AT&#043;UART&#061;9600,0,0\u00a0&#xff08;\u8bbe\u7f6e\u4e3a9600\u6ce2\u7279\u7387&#xff0c;1\u505c\u6b62\u4f4d&#xff0c;\u65e0\u6821\u9a8c&#xff09;<\/li>\n<li>\u8fd4\u56de&#xff1a;OK<\/li>\n<li>\u6ce8\u610f&#xff1a;\u8fd9\u91cc\u8bbe\u7f6e\u7684\u662f\u4e4b\u540e\u4e0eSTM32\u901a\u4fe1\u7684\u901f\u7387&#xff0c;\u901a\u5e38\u90099600\u3002<\/li>\n<\/ul>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"288\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010459-69a0edbb199de.png\" width=\"368\" \/><\/p>\n<li>\n<p>\u8bbe\u7f6e\u4e3b\u4ece\u6a21\u5f0f<\/p>\n<ul>\n<li>\u53d1\u9001&#xff1a;AT&#043;ROLE&#061;0\u00a0&#xff08;0\u4e3a\u4ece\u673aSlave&#xff0c;\u624b\u673a\u8fde\u6a21\u5757\u5fc5\u987b\u8bbe\u4e3a\u4ece\u673a&#xff09;<\/li>\n<li>\u8fd4\u56de&#xff1a;OK<\/li>\n<\/ul>\n<\/li>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"279\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010459-69a0edbb98ca1.png\" width=\"358\" \/><\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u65ad\u7535&#xff0c;\u51c6\u5907\u8fde\u63a5STM32\u3002<\/p>\n<hr \/>\n<h3>\u7b2c\u4e09\u90e8\u5206&#xff1a;STM32CubeMX \u914d\u7f6e<\/h3>\n<p>\u5047\u8bbe\u6211\u4eec\u4f7f\u7528\u00a0STM32F103C8T6&#xff0c;\u6211\u4eec\u5c06\u4f7f\u7528\u00a0USART1\u00a0\u8fde\u63a5\u84dd\u7259&#xff0c;PC13\u00a0\u63a7\u5236\u677f\u8f7dLED\u3002<\/p>\n<h4>3.1 \u57fa\u7840\u914d\u7f6e<\/h4>\n<li>System Core -&gt; SYS&#xff1a;Debug\u9009\u62e9\u00a0Serial Wire\u3002<\/li>\n<li>System Core -&gt; RCC&#xff1a;HSE\u9009\u62e9\u00a0Crystal\/Ceramic Resonator\u3002<\/li>\n<li>Clock Configuration&#xff1a;\u5c06HCLK\u914d\u7f6e\u4e3a72MHz\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"990\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010500-69a0edbc1783d.png\" width=\"2231\" \/><\/p>\n<h4>3.2 \u4e32\u53e3\u914d\u7f6e (USART1)<\/h4>\n<li>\u70b9\u51fb\u00a0Connectivity\u00a0-&gt;\u00a0USART1\u3002<\/li>\n<li>Mode&#xff1a;\u9009\u62e9\u00a0Asynchronous&#xff08;\u5f02\u6b65\u901a\u4fe1&#xff09;\u3002<\/li>\n<li>Parameter Settings&#xff1a;\n<ul>\n<li>Baud Rate:\u00a09600\u00a0(\u5fc5\u987b\u4e0e\u521a\u624dAT\u6307\u4ee4\u8bbe\u7f6e\u7684\u4e00\u81f4)\u3002<\/li>\n<li>Word Length: 8 Bits\u3002<\/li>\n<li>Parity: None\u3002<\/li>\n<li>Stop Bits: 1\u3002<\/li>\n<\/ul>\n<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"976\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010501-69a0edbd12c58.png\" width=\"2323\" \/><\/p>\n<li>NVIC Settings\u00a0(\u4e2d\u65ad\u8bbe\u7f6e)&#xff1a;\n<ul>\n<li>\u52fe\u9009\u00a0USART1 global interrupt\u00a0-&gt;\u00a0Enabled\u3002<\/li>\n<li>\u539f\u7406&#xff1a;\u6211\u4eec\u9700\u8981\u5229\u7528\u4e32\u53e3\u63a5\u6536\u4e2d\u65ad&#xff0c;\u5f53\u84dd\u7259\u53d1\u6765\u6570\u636e\u65f6&#xff0c;CPU\u81ea\u52a8\u8df3\u8fc7\u53bb\u5904\u7406&#xff0c;\u800c\u4e0d\u662f\u6b7b\u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<h4>3.3 LED\u5f15\u811a\u914d\u7f6e<\/h4>\n<li>\u5728\u53f3\u4fa7\u82af\u7247\u56fe\u627e\u5230\u00a0PC13\u3002<\/li>\n<li>\u8bbe\u7f6e\u4e3a\u00a0GPIO_Output\u3002<\/li>\n<li>GPIO Settings&#xff1a;User Label \u547d\u540d\u4e3a\u00a0LED\u3002<\/li>\n<h4>3.4 \u751f\u6210\u4ee3\u7801<\/h4>\n<p>\u70b9\u51fb\u00a0GENERATE CODE&#xff0c;\u751f\u6210Keil\u5de5\u7a0b\u3002<\/p>\n<hr \/>\n<h3>\u7b2c\u56db\u90e8\u5206&#xff1a;\u4ee3\u7801\u7f16\u5199 (Keil MDK)<\/h3>\n<p>\u6211\u4eec\u9700\u8981\u5728\u751f\u6210\u7684\u4ee3\u7801\u4e2d\u6dfb\u52a0\u4e32\u53e3\u63a5\u6536\u903b\u8f91\u3002<\/p>\n<h4>4.1 \u5b9a\u4e49\u53d8\u91cf<\/h4>\n<p>\u5728\u00a0main.c\u00a0\u7684\u00a0\/* USER CODE BEGIN PV *\/\u00a0\u533a\u57df\u6dfb\u52a0&#xff1a;<\/p>\n<p>\/* USER CODE BEGIN PV *\/<br \/>\nuint8_t rx_data; \/\/ \u7528\u4e8e\u5b58\u653e\u63a5\u6536\u5230\u76841\u4e2a\u5b57\u8282\u6570\u636e<br \/>\n\/* USER CODE END PV *\/ <\/p>\n<h4>4.2 \u5f00\u542f\u63a5\u6536\u4e2d\u65ad<\/h4>\n<p>\u5728\u00a0main()\u00a0\u51fd\u6570\u7684\u00a0\/* USER CODE BEGIN 2 *\/\u00a0\u533a\u57df\u5f00\u542f\u7b2c\u4e00\u6b21\u4e2d\u65ad\u63a5\u6536&#xff1a;<\/p>\n<p>\/* USER CODE BEGIN 2 *\/<br \/>\n\/\/ \u5f00\u542f\u4e32\u53e3\u63a5\u6536\u4e2d\u65ad&#xff0c;\u63a5\u65361\u4e2a\u5b57\u8282\u5b58\u5165 rx_data<br \/>\nHAL_UART_Receive_IT(&amp;huart1, &amp;rx_data, 1);<br \/>\n\/* USER CODE END 2 *\/ <\/p>\n<h4>4.3 \u91cd\u5199\u4e2d\u65ad\u56de\u8c03\u51fd\u6570<\/h4>\n<p>\u5728\u00a0main.c\u00a0\u5e95\u90e8\u00a0\/* USER CODE BEGIN 4 *\/\u00a0\u533a\u57df&#xff0c;\u7f16\u5199\u63a5\u6536\u5b8c\u6210\u540e\u7684\u5904\u7406\u903b\u8f91&#xff1a;<\/p>\n<p>\/* USER CODE BEGIN 4 *\/<br \/>\nvoid HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)<br \/>\n{<br \/>\n    \/\/ \u5224\u65ad\u662f\u5426\u662f\u4e32\u53e31\u89e6\u53d1\u7684\u4e2d\u65ad<br \/>\n    if(huart-&gt;Instance &#061;&#061; USART1)<br \/>\n    {<br \/>\n        \/\/ \u903b\u8f91\u5904\u7406&#xff1a;\u5047\u8bbe\u6536\u5230\u5b57\u7b26 &#039;1&#039; \u5f00\u706f&#xff0c;\u6536\u5230 &#039;0&#039; \u5173\u706f<br \/>\n        if(rx_data &#061;&#061; &#039;1&#039;)<br \/>\n        {<br \/>\n            \/\/ \u5bf9\u4e8ePC13&#xff0c;\u901a\u5e38\u4f4e\u7535\u5e73\u70b9\u4eae&#xff0c;\u6839\u636e\u5b9e\u9645\u7535\u8def\u8c03\u6574<br \/>\n            HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); \/\/ \u5f00\u706f<br \/>\n        }<br \/>\n        else if(rx_data &#061;&#061; &#039;0&#039;)<br \/>\n        {<br \/>\n            HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET);   \/\/ \u5173\u706f<br \/>\n        }<\/p>\n<p>        \/\/ \u91cd\u70b9&#xff01;\u5904\u7406\u5b8c\u6570\u636e\u540e&#xff0c;\u5fc5\u987b\u518d\u6b21\u5f00\u542f\u4e2d\u65ad&#xff0c;\u5426\u5219\u53ea\u80fd\u63a5\u6536\u4e00\u6b21<br \/>\n        HAL_UART_Receive_IT(&amp;huart1, &amp;rx_data, 1);<br \/>\n    }<br \/>\n}<br \/>\n\/* USER CODE END 4 *\/ <\/p>\n<hr \/>\n<h3>\u7b2c\u4e94\u90e8\u5206&#xff1a;\u8fde\u63a5\u4e0e\u6d4b\u8bd5<\/h3>\n<h4>5.1 \u6700\u7ec8\u786c\u4ef6\u63a5\u7ebf<\/h4>\n<p>\u5c06STM32\u65ad\u7535&#xff0c;\u8fde\u63a5HC-05&#xff1a;<\/p>\n<ul>\n<li>HC-05\u00a0VCC\u00a0-&gt; STM32\u00a05V<\/li>\n<li>HC-05\u00a0GND\u00a0-&gt; STM32\u00a0GND<\/li>\n<li>HC-05\u00a0TX\u00a0-&gt; STM32\u00a0RX (PA10)<\/li>\n<li>HC-05\u00a0RX\u00a0-&gt; STM32\u00a0TX (PA9)<\/li>\n<\/ul>\n<p>\u6ce8\u610f&#xff1a;\u8fd9\u6b21\u4e0d\u8981\u6309\u6309\u94ae&#xff0c;\u76f4\u63a5\u4e0a\u7535&#xff0c;HC-05\u6307\u793a\u706f\u5e94\u5feb\u95ea&#xff0c;\u8fdb\u5165\u914d\u5bf9\u6a21\u5f0f\u3002<\/p>\n<h4>5.2 \u624b\u673a\u7aef\u64cd\u4f5c<\/h4>\n<li>\u4e0b\u8f7d\u84dd\u7259\u4e32\u53e3APP&#xff08;\u5b89\u5353\u63a8\u8350\u201c\u84dd\u7259\u4e32\u53e3\u52a9\u624b\u201d\u6216\u201cBluetooth Electronics\u201d&#xff09;\u3002<\/li>\n<li>\u6253\u5f00\u624b\u673a\u84dd\u7259&#xff0c;\u641c\u7d22\u8bbe\u5907\u00a0MySTM32_BT&#xff08;\u6211\u4eec\u5728AT\u6a21\u5f0f\u6539\u7684\u540d\u5b57&#xff09;\u3002<\/li>\n<li>\u70b9\u51fb\u8fde\u63a5&#xff0c;\u8f93\u5165\u5bc6\u7801\u00a0123456\u3002<\/li>\n<li>\u8fde\u63a5\u6210\u529f\u540e&#xff0c;HC-05\u6307\u793a\u706f\u53d8\u4e3a\u53cc\u95ea\u6216\u5e38\u4eae\u3002<\/li>\n<h4>5.3 \u63a7\u5236\u6d4b\u8bd5<\/h4>\n<li>\u5728APP\u7684\u5bf9\u8bdd\u6846\u6a21\u5f0f\u4e0b&#xff0c;\u9009\u62e9\u201cASCII\u201d\u6216\u201c\u5b57\u7b26\u6a21\u5f0f\u201d\u53d1\u9001\u3002<\/li>\n<li>\u53d1\u9001\u6570\u5b57\u00a01\u00a0-&gt; \u89c2\u5bdf\u5f00\u53d1\u677fLED\u662f\u5426\u70b9\u4eae\u3002<\/li>\n<li>\u53d1\u9001\u6570\u5b57\u00a00\u00a0-&gt; \u89c2\u5bdf\u5f00\u53d1\u677fLED\u662f\u5426\u7184\u706d\u3002<\/li>\n<hr \/>\n<p><span style=\"color:#fe2c24\">\u5982\u679c\u4e0d\u719f\u6089CUBEmx\u53ef\u4ee5\u53bb\u5c0fB\u7ad9\u641c\u7d22keysking&#xff0c;\u4ed6\u7684\u5feb\u901f\u5165\u95e8\u6559\u7a0b\u582a\u79f0\u7b2c\u4e00\u3002<\/span><\/p>\n<h3>\u603b\u7ed3<\/h3>\n<p>\u901a\u8fc7\u672c\u6587&#xff0c;\u6211\u4eec\u5b8c\u6210\u4e86\u4eceHC-05\u7684\u539f\u7406\u7406\u89e3&#xff0c;\u5230\u4f7f\u7528USB-TTL\u4fee\u6539\u53c2\u6570&#xff0c;\u6700\u540e\u7ed3\u5408STM32CubeMX\u548c\u4e2d\u65ad\u4ee3\u7801\u5b9e\u73b0\u65e0\u7ebf\u63a7\u5236\u7684\u5168\u8fc7\u7a0b\u3002 \u638c\u63e1\u4e86\u8fd9\u4e2a\u57fa\u7840&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u6269\u5c55\u66f4\u591a\u529f\u80fd&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\u53cd\u5411\u4f20\u8f93&#xff1a;STM32\u91c7\u96c6\u6e29\u6e7f\u5ea6\u6570\u636e&#xff0c;\u901a\u8fc7\u00a0HAL_UART_Transmit\u00a0\u53d1\u9001\u7ed9\u624b\u673a\u663e\u793a\u3002<\/li>\n<li>PWM\u8c03\u5149&#xff1a;\u53d1\u9001\u4e0d\u540c\u7684\u5b57\u7b26\u63a7\u5236LED\u7684\u4eae\u5ea6\u3002<\/li>\n<li>\u5c0f\u8f66\u63a7\u5236&#xff1a;\u53d1\u9001 &#039;W&#039;, &#039;A&#039;, &#039;S&#039;, &#039;D&#039; \u63a7\u5236\u84dd\u7259\u5c0f\u8f66\u7684\u524d\u540e\u5de6\u53f3\u3002<\/li>\n<\/ul>\n<p>\u6ce8\u610f\u4e8b\u9879&#xff1a;\u84dd\u7259\u6a21\u5757\u6709\u65f6\u5019\u9700\u8981\u7684\u662f3.6\u52306v\u4f9b\u7535&#xff0c;\u63a53.3v\u4f1a\u641c\u7d22\u4e0d\u5230\u6a21\u5757&#xff0c;\u76f4\u63a5\u63a55V\u4f9b\u7535<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00<br \/>\n\u5728\u7269\u8054\u7f51&#xff08;IoT&#xff09;\u5165\u95e8\u9879\u76ee\u4e2d&#xff0c;\u65e0\u7ebf\u901a\u4fe1\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\u3002\u84dd\u7259HC-05\u6a21\u5757\u56e0\u5176\u4ef7\u683c\u4f4e\u5ec9\u3001\u4f7f\u7528\u7b80\u5355&#xff08;\u4e32\u53e3\u900f\u4f20&#xff09;&#xff0c;\u6210\u4e3a\u4e86\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u7684\u9996\u9009\u3002\u672c\u6587\u5c06\u5e26\u4f60\u4eceHC-05\u7684\u5de5\u4f5c\u539f\u7406\u51fa\u53d1&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u901a\u8fc7AT\u6307\u4ee4\u914d\u7f6e\u6a21\u5757&#xff0c;\u5e76\u4f7f\u7528STM32CubeMX\u4e0eHAL\u5e93\u5b9e\u73b0\u624b\u673a\u84dd\u7259\u63a7\u5236LED\u706f\u7684\u4eae\u706d\u3002 \u7b2c\u4e00\u90e8\u5206&#xff1a;HC-05\u84dd\u7259\u6a21\u5757\u539f\u7406\u7b80\u8ff0<br \/>\n1.1 \u4ec0\u4e48\u662f\u201c\u4e32\u53e3\u900f\u4f20<\/p>\n","protected":false},"author":2,"featured_media":78351,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[217,269,1631],"topic":[],"class_list":["post-78361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-stm32","tag-269","tag-1631"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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:\/\/www.wsisp.com\/helps\/78361.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 \u5728\u7269\u8054\u7f51&#xff08;IoT&#xff09;\u5165\u95e8\u9879\u76ee\u4e2d&#xff0c;\u65e0\u7ebf\u901a\u4fe1\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\u3002\u84dd\u7259HC-05\u6a21\u5757\u56e0\u5176\u4ef7\u683c\u4f4e\u5ec9\u3001\u4f7f\u7528\u7b80\u5355&#xff08;\u4e32\u53e3\u900f\u4f20&#xff09;&#xff0c;\u6210\u4e3a\u4e86\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u7684\u9996\u9009\u3002\u672c\u6587\u5c06\u5e26\u4f60\u4eceHC-05\u7684\u5de5\u4f5c\u539f\u7406\u51fa\u53d1&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u901a\u8fc7AT\u6307\u4ee4\u914d\u7f6e\u6a21\u5757&#xff0c;\u5e76\u4f7f\u7528STM32CubeMX\u4e0eHAL\u5e93\u5b9e\u73b0\u624b\u673a\u84dd\u7259\u63a7\u5236LED\u706f\u7684\u4eae\u706d\u3002 \u7b2c\u4e00\u90e8\u5206&#xff1a;HC-05\u84dd\u7259\u6a21\u5757\u539f\u7406\u7b80\u8ff0 1.1 \u4ec0\u4e48\u662f\u201c\u4e32\u53e3\u900f\u4f20\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/78361.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-27T01:05:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010454-69a0edb6b5834.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78361.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/78361.html\",\"name\":\"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-27T01:05:03+00:00\",\"dateModified\":\"2026-02-27T01:05:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/78361.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/78361.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78361.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/78361.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00 \u5728\u7269\u8054\u7f51&#xff08;IoT&#xff09;\u5165\u95e8\u9879\u76ee\u4e2d&#xff0c;\u65e0\u7ebf\u901a\u4fe1\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\u3002\u84dd\u7259HC-05\u6a21\u5757\u56e0\u5176\u4ef7\u683c\u4f4e\u5ec9\u3001\u4f7f\u7528\u7b80\u5355&#xff08;\u4e32\u53e3\u900f\u4f20&#xff09;&#xff0c;\u6210\u4e3a\u4e86\u5d4c\u5165\u5f0f\u5f00\u53d1\u8005\u7684\u9996\u9009\u3002\u672c\u6587\u5c06\u5e26\u4f60\u4eceHC-05\u7684\u5de5\u4f5c\u539f\u7406\u51fa\u53d1&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u5982\u4f55\u901a\u8fc7AT\u6307\u4ee4\u914d\u7f6e\u6a21\u5757&#xff0c;\u5e76\u4f7f\u7528STM32CubeMX\u4e0eHAL\u5e93\u5b9e\u73b0\u624b\u673a\u84dd\u7259\u63a7\u5236LED\u706f\u7684\u4eae\u706d\u3002 \u7b2c\u4e00\u90e8\u5206&#xff1a;HC-05\u84dd\u7259\u6a21\u5757\u539f\u7406\u7b80\u8ff0 1.1 \u4ec0\u4e48\u662f\u201c\u4e32\u53e3\u900f\u4f20","og_url":"https:\/\/www.wsisp.com\/helps\/78361.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-27T01:05:03+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260227010454-69a0edb6b5834.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/78361.html","url":"https:\/\/www.wsisp.com\/helps\/78361.html","name":"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-27T01:05:03+00:00","dateModified":"2026-02-27T01:05:03+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/78361.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/78361.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/78361.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4ece\u96f6\u5f00\u59cb\uff1a\u6df1\u5165\u89e3\u6790\u84dd\u7259HC-05\u6a21\u5757\u2014\u2014\u539f\u7406\u3001AT\u914d\u7f6e\u4e0eSTM32\u5b9e\u6218\u63a7\u5236"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/78361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=78361"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/78361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/78351"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=78361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=78361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=78361"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=78361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}