{"id":94120,"date":"2024-06-17T09:53:04","date_gmt":"2024-06-17T01:53:04","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=94120"},"modified":"2024-06-17T09:53:09","modified_gmt":"2024-06-17T01:53:09","slug":"sdzhxdsz","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/94120.html","title":{"rendered":"SX1278\u5730\u5740\u548c\u4fe1\u9053\u8bbe\u7f6e"},"content":{"rendered":"\n
\u3000\u3000SX1278<\/strong>\u662f\u4e00\u6b3e\u57fa\u4e8eLoRa\u6269\u9891\u6280\u672f\u7684\u65e0\u7ebf\u5c04\u9891\u6a21\u5757\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u8fdc\u8ddd\u79bb\u6570\u636e\u4f20\u8f93\u3002\u4ee5\u4e0b\u662f\u5173\u4e8eSX1278\u5730\u5740\u548c\u4fe1\u9053\u8bbe\u7f6e\u7684\u8be6\u7ec6\u8bf4\u660e\uff1a<\/p>\n\n\n\n \u3000\u3000\u5730\u5740\u8bbe\u7f6e<\/strong><\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u5728\u5e7f\u64ad\u6a21\u5f0f\u4e0b\u9ed8\u8ba4\u5730\u5740\u4e3aFF FF\u62160000.\u8fd9\u610f\u5473\u7740\u5b83\u4f1a\u8fdb\u884c\u5e7f\u64ad\u53d1\u9001\uff0c\u800c\u4e0d\u662f\u7279\u5b9a\u76ee\u6807\u7684\u70b9\u5bf9\u70b9\u901a\u4fe1\u3002<\/p>\n\n\n\n \u3000\u3000\u4fe1\u9053\u8bbe\u7f6e<\/strong><\/p>\n\n\n\n \u3000\u3000SX1278\u652f\u6301\u591a\u79cd\u5de5\u4f5c\u9891\u6bb5\uff0c\u4e3b\u8981\u5305\u62ec137MHz\u81f3525MHz\u7684\u9891\u6bb5\u3002\u5177\u4f53\u7684\u4fe1\u9053\u8bbe\u7f6e\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u5bc4\u5b58\u5668\u6765\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7SPI\u63a5\u53e3\u4e0e\u5fae\u63a7\u5236\u5668\u8fdb\u884c\u901a\u4fe1\uff0c\u5e76\u914d\u7f6e\u76f8\u5173\u5bc4\u5b58\u5668\u6765\u8bbe\u7f6e\u9891\u7387\u3001\u5e26\u5bbd\u3001\u6269\u9891\u56e0\u5b50\u7b49\u53c2\u6570\u3002<\/p>\n\n\n\n \u3000\u3000\u914d\u7f6e\u793a\u4f8b<\/strong><\/p>\n\n\n\n \u3000\u3000\u9891\u7387\u8bbe\u7f6e<\/strong>\uff1aSX1278\u53ef\u4ee5\u5728\u591a\u4e2a\u9891\u6bb5\u5de5\u4f5c\uff0c\u5e38\u7528\u7684\u9891\u6bb5\u5305\u62ec433MHz\u548c868MHz\u3002\u5728\u914d\u7f6e\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u9002\u5408\u5f53\u524d\u5e94\u7528\u573a\u666f\u7684\u9891\u6bb5\u3002<\/p>\n\n\n\n \u3000\u3000\u5e26\u5bbd\u548c\u6269\u9891\u56e0\u5b50<\/strong>\uff1a\u5e26\u5bbd\u548c\u6269\u9891\u56e0\u5b50\u662f\u5f71\u54cd\u901a\u4fe1\u8ddd\u79bb\u548c\u8d28\u91cf\u7684\u91cd\u8981\u53c2\u6570\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u8bbe\u7f6e1\/7-4\u4f4d\u4fe1\u53f7\u5e26\u5bbd(\u9ed8\u8ba4125kHz)\u548c\u76f8\u5e94\u7684\u6269\u9891\u56e0\u5b50\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u5236\u65b9\u5f0f<\/strong>\uff1aSX1278\u652f\u6301\u591a\u79cd\u8c03\u5236\u65b9\u5f0f\uff0c\u5e38\u7528\u7684\u662fLoRa\u548cFSK\u3002LoRa\u8c03\u5236\u65b9\u5f0f\u9002\u7528\u4e8e\u957f\u8ddd\u79bb\u901a\u4fe1\uff0c\u800cFSK\u8c03\u5236\u65b9\u5f0f\u5219\u66f4\u9002\u5408\u77ed\u8ddd\u79bb\u901a\u4fe1\u3002<\/p>\n\n\n\n \u3000\u3000\u786c\u4ef6\u8fde\u63a5<\/strong><\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u901a\u5e38\u901a\u8fc7SPI\u63a5\u53e3\u4e0e\u5fae\u63a7\u5236\u5668\u8fdb\u884c\u901a\u4fe1\u3002\u8fde\u63a5\u65f6\u9700\u8981\u6ce8\u610f\u5f15\u811a\u5b9a\u4e49\u548c\u4e0a\u62c9\u7535\u963b\u7684\u4f7f\u7528\uff0c\u4ee5\u786e\u4fdd\u4fe1\u53f7\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n\n\n\n \u3000\u3000\u8f6f\u4ef6\u914d\u7f6e<\/strong><\/p>\n\n\n\n \u3000\u3000\u5728\u8f6f\u4ef6\u5c42\u9762\uff0c\u53ef\u4ee5\u901a\u8fc7\u7f16\u7a0b\u6765\u914d\u7f6eSX1278\u7684\u5404\u9879\u53c2\u6570\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528STM32\u901a\u8fc7SPI\u9a71\u52a8SX1278.\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u53c2\u6570\u914d\u7f6e\uff0c\u5982\u9891\u7387\u3001\u5e26\u5bbd\u3001\u6269\u9891\u56e0\u5b50\u7b49\u3002<\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u7684\u5730\u5740\u548c\u4fe1\u9053\u8bbe\u7f6e\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u9700\u6c42\u8fdb\u884c\u8be6\u7ec6\u914d\u7f6e\uff0c\u5305\u62ec\u9009\u62e9\u5408\u9002\u7684\u9891\u6bb5\u3001\u8c03\u6574\u5e26\u5bbd\u548c\u6269\u9891\u56e0\u5b50\u4ee5\u53ca\u9009\u62e9\u5408\u9002\u7684\u8c03\u5236\u65b9\u5f0f\u3002\u901a\u8fc7\u6b63\u786e\u7684\u786c\u4ef6\u8fde\u63a5\u548c\u8f6f\u4ef6\u914d\u7f6e\uff0c\u53ef\u4ee5\u5145\u5206\u53d1\u6325SX1278\u6a21\u5757\u5728\u8fdc\u8ddd\u79bb\u6570\u636e\u4f20\u8f93\u4e2d\u7684\u4f18\u52bf\u3002<\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u662f\u4e00\u6b3e\u5e7f\u6cdb\u5e94\u7528\u4e8e\u65e0\u7ebf\u901a\u4fe1\u9886\u57df\u7684\u4f4e\u529f\u8017\u3001\u9ad8\u6027\u80fd\u5c04\u9891\u6536\u53d1\u5668\u82af\u7247\u3002\u5b83\u652f\u6301\u591a\u4e2a\u9891\u6bb5\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e433MHz\u3001868MHz\u548c915MHz\u7b49\u5e38\u7528\u9891\u6bb5\u3002\u6b64\u5916\uff0cSX1278\u8fd8\u652f\u6301\u66f4\u5bbd\u7684\u9891\u6bb5\u8303\u56f4\uff0c\u4ece137MHz\u5230525MHz\u3002<\/p>\n\n\n\n \u3000\u3000433MHz\u9891\u6bb5<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u6700\u5927\u8f93\u51fa\u529f\u7387\u4e3a20dBm\u3002<\/p>\n\n\n\n \u3000\u3000\u53d1\u5c04\u7535\u6d41\u4e3a120mA\uff0c\u63a5\u6536\u7535\u6d41\u4e3a13mA\uff0c\u4f11\u7720\u7535\u6d41\u4e3a1uA\u3002<\/p>\n\n\n\n \u3000\u3000\u901a\u4fe1\u63a5\u53e3\u4e3aSPI\u6216UART\u3002<\/p>\n\n\n\n \u3000\u3000\u6a21\u5757\u5c3a\u5bf8\u4e3a1515mm\u621621.614.9mm\u3002<\/p>\n\n\n\n \u3000\u3000410-525MHz\u9891\u6bb5<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u5de5\u4f5c\u7535\u538b\u8303\u56f4\u4e3a2.4V\u81f33.7V\u3002<\/p>\n\n\n\n \u3000\u3000\u53d1\u5c04\u529f\u7387\u4e3a19\u00b11 dBm\u3002<\/p>\n\n\n\n \u3000\u3000\u901a\u4fe1\u63a5\u53e3\u4e3aSPI\uff0c\u6a21\u5757\u5c3a\u5bf8\u4e3a17*16mm\u3002<\/p>\n\n\n\n \u3000\u3000868MHz\u548c915MHz\u9891\u6bb5<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u8fd9\u4e9b\u9891\u6bb5\u4e5f\u88ab\u5e7f\u6cdb\u652f\u6301\uff0c\u4f46\u5177\u4f53\u53c2\u6570\u672a\u5728\u8bc1\u636e\u4e2d\u8be6\u7ec6\u8bf4\u660e\u3002<\/p>\n\n\n\n \u3000\u3000\u8fdc\u8ddd\u79bb\u4f20\u8f93<\/strong>\uff1aSX1278\u6a21\u5757\u80fd\u591f\u5b9e\u73b0\u8f83\u8fdc\u8ddd\u79bb\u7684\u901a\u4fe1\uff0c\u4f8b\u5982\u76f4\u7ebf\u8ddd\u79bb3km\u5de6\u53f3\uff0c\u4f46\u5176\u7a7f\u5899\u6027\u80fd\u8f83\u5dee\uff0c\u53ef\u80fd\u4f1a\u53d7\u5230\u5efa\u7b51\u7269\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n \u3000\u3000\u4f4e\u529f\u8017<\/strong>\uff1a\u8be5\u6a21\u5757\u5177\u6709\u6781\u9ad8\u7684\u63a5\u6536\u7075\u654f\u5ea6\u548c\u4f4e\u529f\u8017\u7279\u6027\uff0c\u9002\u5408\u9700\u8981\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u5e94\u7528\u573a\u666f\u3002<\/p>\n\n\n\n \u3000\u3000\u591a\u529f\u80fd\u6027<\/strong>\uff1aSX1278\u652f\u6301\u900f\u660e\u6570\u636e\u4f20\u8f93\uff0c\u7528\u6237\u65e0\u9700\u7f16\u5199\u590d\u6742\u7684\u8bbe\u7f6e\u4e0e\u4f20\u8f93\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u4e13\u6ce8\u4e8e\u7cfb\u7edf\u529f\u80fd\u5b9e\u73b0\u3002<\/p>\n\n\n\n \u3000\u3000\u7a7f\u5899\u80fd\u529b\u4e0d\u8db3<\/strong>\uff1a\u5c3d\u7ba1SX1278\u5728\u8fdc\u8ddd\u79bb\u4f20\u8f93\u65b9\u9762\u8868\u73b0\u51fa\u8272\uff0c\u4f46\u5176\u7a7f\u5899\u6027\u80fd\u8f83\u5dee\uff0c\u53ef\u80fd\u4f1a\u5728\u590d\u6742\u73af\u5883\u4e2d\u9047\u5230\u4fe1\u53f7\u8870\u51cf\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n \u3000\u3000\u9891\u6bb5\u9009\u62e9\u9650\u5236<\/strong>\uff1a\u867d\u7136SX1278\u652f\u6301\u591a\u4e2a\u9891\u6bb5\uff0c\u4f46\u7528\u6237\u9700\u8981\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u9891\u6bb5\uff0c\u4ee5\u786e\u4fdd\u6700\u4f73\u6027\u80fd\u3002<\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u5728\u4e0d\u540c\u9891\u6bb5\u4e0b\u7684\u6027\u80fd\u8868\u73b0\u548c\u9650\u5236\u4e3b\u8981\u4f53\u73b0\u5728\u5176\u8fdc\u8ddd\u79bb\u4f20\u8f93\u80fd\u529b\u3001\u4f4e\u529f\u8017\u7279\u6027\u4ee5\u53ca\u7a7f\u5899\u6027\u80fd\u4e0d\u8db3\u7b49\u65b9\u9762\u3002<\/p>\n\n\n\n \u3000\u3000\u8981\u901a\u8fc7\u7f16\u7a0b\u7cbe\u786e\u8bbe\u7f6eSX1278\u6a21\u5757\u7684\u5e26\u5bbd\u548c\u6269\u9891\u56e0\u5b50\u4ee5\u4f18\u5316\u8fdc\u8ddd\u79bb\u6570\u636e\u4f20\u8f93\uff0c\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u6b65\u9aa4\u548c\u5efa\u8bae\uff1a<\/p>\n\n\n\n \u3000\u3000\u7406\u89e3\u5173\u952e\u53c2\u6570<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u6269\u9891\u56e0\u5b50(SF)<\/strong>\uff1a\u6269\u9891\u56e0\u5b50\u662f\u5f71\u54cd\u901a\u4fe1\u8ddd\u79bb\u548c\u529f\u8017\u7684\u91cd\u8981\u53c2\u6570\u4e4b\u4e00\u3002\u6269\u9891\u56e0\u5b50\u8d8a\u9ad8\uff0c\u4f20\u8f93\u65f6\u95f4\u8d8a\u957f\uff0c\u8c03\u5236\u89e3\u8c03\u8d8a\u590d\u6742\uff0c\u7075\u654f\u5ea6\u4e5f\u8d8a\u9ad8\uff0c\u4f20\u8f93\u8ddd\u79bb\u4e5f\u8d8a\u8fdc\uff0c\u4f46\u4f20\u8f93\u901f\u7387\u4f1a\u964d\u4f4e\u3002<\/p>\n\n\n\n \u3000\u3000\u4fe1\u53f7\u5e26\u5bbd(BW)<\/strong>\uff1a\u4fe1\u53f7\u5e26\u5bbd\u51b3\u5b9a\u4e86\u6570\u636e\u4f20\u8f93\u7684\u901f\u7387\u3002\u5e26\u5bbd\u8d8a\u5927\uff0c\u6570\u636e\u4f20\u8f93\u901f\u7387\u8d8a\u9ad8\uff0c\u4f46\u53ef\u80fd\u4f1a\u589e\u52a0\u566a\u58f0\u5e72\u6270\u548c\u529f\u8017\u3002<\/p>\n\n\n\n \u3000\u3000\u914d\u7f6e\u65b9\u6cd5<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u5728\u4f7f\u7528SX1278\u6a21\u5757\u4e4b\u524d\uff0c\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u57fa\u672c\u7684\u8f6f\u4ef6\u914d\u7f6e\u3002\u8fd9\u5305\u62ec\u8bbe\u7f6e\u5de5\u4f5c\u9891\u7387\u3001\u529f\u7387\u3001\u6269\u9891\u56e0\u5b50\u7b49\u53c2\u6570\u3002<\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u5185\u90e8\u81ea\u52a8\u6269\u9891\u8ba1\u7b97\u548c\u786c\u4ef6\u6821\u9a8c\u5904\u7406\uff0c\u7528\u6237\u4e0d\u9700\u8981\u4e86\u89e3\u592a\u590d\u6742\u7684\u5c04\u9891\u77e5\u8bc6\uff0c\u53ea\u9700\u8c03\u8bd5\u5e95\u5c42SPI\u901a\u4fe1\uff0c\u5e76\u7406\u89e3\u597d\u51fd\u6570\u7684\u610f\u4e49\u5373\u53ef\u8f7b\u677e\u5e94\u7528\u6b64\u6a21\u5757\u3002<\/p>\n\n\n\n \u3000\u3000\u4f18\u5316\u7b56\u7565<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u8c03\u6574\u6269\u9891\u56e0\u5b50<\/strong>\uff1a\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u4f20\u8f93\u8ddd\u79bb\uff0c\u9009\u62e9\u5408\u9002\u7684\u6269\u9891\u56e0\u5b50\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9700\u8981\u8f83\u8fdc\u7684\u4f20\u8f93\u8ddd\u79bb\uff0c\u53ef\u4ee5\u9009\u62e9\u8f83\u9ad8\u7684\u6269\u9891\u56e0\u5b50\uff0c\u4f46\u8fd9\u4f1a\u5bfc\u81f4\u4f20\u8f93\u901f\u7387\u964d\u4f4e\u3002<\/p>\n\n\n\n \u3000\u3000\u9009\u62e9\u5408\u9002\u7684\u5e26\u5bbd<\/strong>\uff1a\u6839\u636e\u4f20\u8f93\u901f\u7387\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u4fe1\u53f7\u5e26\u5bbd\u3002\u5e26\u5bbd\u8d8a\u5927\uff0c\u6570\u636e\u4f20\u8f93\u901f\u7387\u8d8a\u9ad8\uff0c\u4f46\u53ef\u80fd\u4f1a\u589e\u52a0\u566a\u58f0\u5e72\u6270\u548c\u529f\u8017\u3002<\/p>\n\n\n\n \u3000\u3000\u5b9e\u9645\u5e94\u7528\u793a\u4f8b<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u4f8b\u5982\uff0c\u5728\u4e00\u4e2a6km\u8fdc\u8ddd\u79bb\u6570\u636e\u4f20\u8f93\u7684\u5e94\u7528\u573a\u666f\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f18\u5316\u6269\u9891\u56e0\u5b50\u548c\u4fe1\u53f7\u5e26\u5bbd\u6765\u5b9e\u73b0\u9ad8\u6548\u7a33\u5b9a\u7684\u8de8\u8ddd\u79bb\u901a\u8baf\u3002<\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u652f\u6301\u7684SPI\u63a5\u53e3\u914d\u7f6e\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n \u3000\u3000\u786c\u4ef6\u8fde\u63a5<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u5c06SX1278\u6a21\u5757\u76843.3V\u5f15\u811a\u8fde\u63a5\u5230Arduino UNO\u677f\u4e0a\u76843.3V\u5f15\u811a\u3002<\/p>\n\n\n\n \u3000\u3000\u521d\u59cb\u5316SPI<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u786e\u4fdd\u6811\u8393\u6d3e\u6216\u5176\u4ed6MCU\u7684SPI\u63a5\u53e3\u5df2\u542f\u7528\uff0c\u5e76\u5728\/dev\u4e2d\u67e5\u770b\u662f\u5426\u6709spidev0.0\u8bbe\u5907\u6587\u4ef6\u3002<\/p>\n\n\n\n \u3000\u3000\u5bf9\u4e8eSTM32F103\u7b49MCU\uff0c\u53ef\u4ee5\u53c2\u8003\u73b0\u6709\u7684SPI\u9a71\u52a8\u4ee3\u7801\u8fdb\u884c\u521d\u59cb\u5316\u3002<\/p>\n\n\n\n \u3000\u3000\u4e0b\u8f7dSX1278\u624b\u518c<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u4e0b\u8f7d\u5e76\u9605\u8bfbSX1278\u7684\u82af\u7247\u8bf4\u660e\u6587\u6863\uff0c\u627e\u5230\u5173\u4e8eSPI\u901a\u4fe1\u7684\u90e8\u5206\u548c\u65f6\u5e8f\u56fe\u3002<\/p>\n\n\n\n \u3000\u3000\u8f6f\u4ef6\u521d\u59cb\u5316<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u5728\u4e3b\u7a0b\u5e8f\u4e2d\u8fdb\u884c\u786c\u4ef6\u521d\u59cb\u5316\u548c\u8f6f\u4ef6\u521d\u59cb\u5316\u3002\u786c\u4ef6\u521d\u59cb\u5316\u5305\u62ecGPIO\u5f15\u811a\u548cSPI\u7684\u521d\u59cb\u5316;\u8f6f\u4ef6\u521d\u59cb\u5316\u5219\u6d89\u53ca\u5230\u5bc4\u5b58\u5668\u7684\u914d\u7f6e\u3002<\/p>\n\n\n\n \u3000\u3000\u7f16\u5199\u901a\u4fe1\u4ee3\u7801<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u7f16\u5199SPI\u901a\u4fe1\u4ee3\u7801\uff0c\u5305\u62ec\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e\u7684\u51fd\u6570\u3002\u53ef\u4ee5\u4f7f\u7528\u786c\u4ef6SPI\u6216\u8f6f\u4ef6SPI\uff0c\u4f46\u786c\u4ef6SPI\u7684\u79fb\u690d\u6027\u8f83\u5dee\u3002<\/p>\n\n\n\n \u3000\u3000\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684Arduino\u793a\u4f8b\u4ee3\u7801\uff0c\u5c55\u793a\u5982\u4f55\u4f7f\u7528SX1278\u6a21\u5757\u8fdb\u884c\u57fa\u672c\u7684SPI\u901a\u4fe1\uff1a<\/p>\n\n\n\n \u3000\u3000#include<\/p>\n\n\n\n \u3000\u3000#include<\/p>\n\n\n\n \u3000\u3000#define LORA_CS 10 \/\/ Chip select pin, connect to Digital 10<\/p>\n\n\n\n \u3000\u3000#define LORA_RST 9 \/\/ Reset pin, connect to Digital 9<\/p>\n\n\n\n \u3000\u3000LoRa lora(LORA_CS, LORA_RST);<\/p>\n\n\n\n \u3000\u3000void setup() {<\/p>\n\n\n\n \u3000\u3000Serial.begin (115200);<\/p>\n\n\n\n \u3000\u3000while (!Serial) {<\/p>\n\n\n\n \u3000\u3000delay(100); \/\/ Wait for serial port to open<\/p>\n\n\n\n \u3000\u3000}<\/p>\n\n\n\n \u3000\u3000Serial.println (“LoRa Module Test”);<\/p>\n\n\n\n \u3000\u3000}<\/p>\n\n\n\n \u3000\u3000void loop() {<\/p>\n\n\n\n \u3000\u3000\/\/ Set frequency to 868 MHz<\/p>\n\n\n\n \u3000\u3000lora.set Frequency(868.0);<\/p>\n\n\n\n \u3000\u3000\/\/ Set PA level low (5dBm)<\/p>\n\n\n\n \u3000\u3000lora.setPALevel (0);<\/p>\n\n\n\n \u3000\u3000\/\/ Start transmitting<\/p>\n\n\n\n \u3000\u3000lora.startTransmit ();<\/p>\n\n\n\n \u3000\u3000\/\/ Data to send<\/p>\n\n\n\n \u3000\u3000char* data = “Hello, LoRa!”;<\/p>\n\n\n\n \u3000\u3000int length = strlen(data);<\/p>\n\n\n\n \u3000\u3000\/\/ Send data<\/p>\n\n\n\n \u3000\u3000lora.write (data, length);<\/p>\n\n\n\n \u3000\u3000\/\/ Stop transmitting<\/p>\n\n\n\n \u3000\u3000lora.stopTransmit ();<\/p>\n\n\n\n \u3000\u3000\/\/ Wait until all the data is sent<\/p>\n\n\n\n \u3000\u3000delay(2000);<\/p>\n\n\n\n \u3000\u3000\/\/ Read received packet, len is maximum of 256 bytes<\/p>\n\n\n\n \u3000\u3000uint8_t len = lora.readPacket ();<\/p>\n\n\n\n \u3000\u3000if (len == 0) return;<\/p>\n\n\n\n \u3000\u3000char received[256];<\/p>\n\n\n\n \u3000\u3000lora.read (received, len);<\/p>\n\n\n\n \u3000\u3000Serial.println (“Received: “);<\/p>\n\n\n\n \u3000\u3000Serial.println (received);<\/p>\n\n\n\n \u3000\u3000delay(4000);<\/p>\n\n\n\n \u3000\u3000}<\/p>\n\n\n\n \u3000\u3000\u8fd9\u4e2a\u793a\u4f8b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u521d\u59cb\u5316SX1278\u6a21\u5757\u3001\u8bbe\u7f6e\u9891\u7387\u3001\u53d1\u9001\u6570\u636e\u4ee5\u53ca\u8bfb\u53d6\u63a5\u6536\u5230\u7684\u6570\u636e\u3002\u8bf7\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8c03\u6574\u5f15\u811a\u5b9a\u4e49\u548c\u53c2\u6570\u8bbe\u7f6e\u3002<\/p>\n\n\n\n \u3000\u3000\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u9009\u62e9SX1278\u6a21\u5757\u7684\u6700\u4f73\u4fe1\u9053\u8bbe\u7f6e\u9700\u8981\u8003\u8651\u591a\u4e2a\u56e0\u7d20\uff0c\u5305\u62ec\u4f20\u8f93\u8ddd\u79bb\u3001\u9891\u6bb5\u652f\u6301\u3001\u6297\u5e72\u6270\u80fd\u529b\u548c\u6570\u636e\u65f6\u6548\u6027\u7b49\u3002\u4ee5\u4e0b\u662f\u6839\u636e\u4e0d\u540c\u5e94\u7528\u573a\u666f\u9009\u62e9SX1278\u6a21\u5757\u7684\u6700\u4f73\u4fe1\u9053\u8bbe\u7f6e\u7684\u8be6\u7ec6\u5efa\u8bae\uff1a<\/p>\n\n\n\n \u3000\u3000\u667a\u80fd\u5bb6\u5c45\u548c\u5de5\u4e1a\u81ea\u52a8\u5316<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u9891\u6bb5\u9009\u62e9<\/strong>\uff1aSX1278\u652f\u6301\u591a\u4e2a\u9891\u6bb5\uff0c\u5305\u62ec433 MHz\u548c490 MHz\u7b49\u5e38\u7528\u9891\u6bb5\u3002\u5bf9\u4e8e\u667a\u80fd\u5bb6\u5c45\u548c\u5de5\u4e1a\u81ea\u52a8\u5316\u8fd9\u7c7b\u5bf9\u6570\u636e\u65f6\u6548\u6027\u8981\u6c42\u8f83\u9ad8\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u9009\u62e9433 MHz\u9891\u6bb5\uff0c\u56e0\u4e3a\u5b83\u5728\u8fd9\u4e9b\u5e94\u7528\u4e2d\u8868\u73b0\u51fa\u8f83\u597d\u7684\u4f20\u8f93\u901f\u5ea6\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u5236\u65b9\u5f0f<\/strong>\uff1a\u7531\u4e8e\u8fd9\u4e9b\u5e94\u7528\u9700\u8981\u5feb\u901f\u54cd\u5e94\uff0c\u53ef\u4ee5\u91c7\u7528GFSK(\u9ad8\u9891\u7387\u952e\u63a7)\u8c03\u5236\u65b9\u5f0f\uff0c\u8fd9\u79cd\u65b9\u5f0f\u5728\u4f20\u8f93\u901f\u5ea6\u4e0a\u76f8\u5bf9\u8f83\u5feb\uff0c\u9002\u5408\u5b9e\u65f6\u76d1\u63a7\u548c\u63a7\u5236\u3002<\/p>\n\n\n\n \u3000\u3000\u667a\u6167\u57ce\u5e02\u548c\u8fdc\u7a0b\u76d1\u63a7<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u9891\u6bb5\u9009\u62e9<\/strong>\uff1a\u5bf9\u4e8e\u9700\u8981\u8986\u76d6\u66f4\u5e7f\u8303\u56f4\u7684\u667a\u6167\u57ce\u5e02\u548c\u8fdc\u7a0b\u76d1\u63a7\u5e94\u7528\uff0c\u53ef\u4ee5\u9009\u62e9490 MHz\u6216\u5176\u4ed6\u81ea\u7531\u5b9a\u5236\u7684\u9891\u6bb5\uff0c\u4ee5\u786e\u4fdd\u4fe1\u53f7\u80fd\u591f\u7a7f\u900f\u66f4\u591a\u969c\u788d\u7269\u5e76\u4fdd\u6301\u7a33\u5b9a\u7684\u4f20\u8f93\u8ddd\u79bb\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u5236\u65b9\u5f0f<\/strong>\uff1a\u53ef\u4ee5\u91c7\u7528LoRa\u6269\u9891\u8c03\u5236\u6280\u672f\uff0c\u8fd9\u79cd\u6280\u672f\u5728\u4f4e\u529f\u8017\u7684\u540c\u65f6\u80fd\u591f\u5b9e\u73b0\u8fdc\u8ddd\u79bb\u4f20\u8f93\uff0c\u5177\u6709\u5f88\u5f3a\u7684\u6297\u5e72\u6270\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000\u65e0\u7ebf\u6284\u8868\u548c\u5b89\u9632\u62a5\u8b66<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u9891\u6bb5\u9009\u62e9<\/strong>\uff1a\u5bf9\u4e8e\u65e0\u7ebf\u6284\u8868\u548c\u5b89\u9632\u62a5\u8b66\u8fd9\u7c7b\u5e94\u7528\uff0c\u53ef\u4ee5\u9009\u62e9433 MHz\u9891\u6bb5\uff0c\u56e0\u4e3a\u5b83\u5728\u8fd9\u4e9b\u5e94\u7528\u4e2d\u8868\u73b0\u51fa\u8f83\u597d\u7684\u4f20\u8f93\u8ddd\u79bb\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u5236\u65b9\u5f0f<\/strong>\uff1a\u53ef\u4ee5\u91c7\u7528FSK(\u9891\u7387\u952e\u63a7)\u6216GFSK\u8c03\u5236\u65b9\u5f0f\uff0c\u8fd9\u4e9b\u65b9\u5f0f\u5728\u4f4e\u529f\u8017\u7684\u540c\u65f6\u80fd\u591f\u63d0\u4f9b\u8f83\u9ad8\u7684\u4f20\u8f93\u901f\u5ea6\u548c\u8f83\u597d\u7684\u6297\u5e72\u6270\u6027\u80fd\u3002<\/p>\n\n\n\n \u3000\u3000\u5168\u7403\u8303\u56f4\u5185\u7684\u5e94\u7528<\/strong>\uff1a<\/p>\n\n\n\n \u3000\u3000\u9891\u6bb5\u9009\u62e9<\/strong>\uff1a\u5bf9\u4e8e\u9700\u8981\u5728\u5168\u7403\u8303\u56f4\u5185\u4f7f\u7528\u7684\u5e94\u7528\uff0c\u53ef\u4ee5\u9009\u62e9\u591a\u4e2a\u9891\u6bb5\uff0c\u5982433 MHz\u3001490 MHz\u7b49\uff0c\u5e76\u6839\u636e\u5177\u4f53\u5730\u533a\u9009\u62e9\u6700\u9002\u5408\u7684\u9891\u6bb5\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u5236\u65b9\u5f0f<\/strong>\uff1a\u53ef\u4ee5\u91c7\u7528LoRa\u6269\u9891\u8c03\u5236\u6280\u672f\uff0c\u8fd9\u79cd\u6280\u672f\u5728\u5168\u7403\u8303\u56f4\u5185\u90fd\u80fd\u63d0\u4f9b\u826f\u597d\u7684\u4f20\u8f93\u6027\u80fd\u548c\u6297\u5e72\u6270\u80fd\u529b\u3002<\/p>\n\n\n\n \u3000\u3000\u9009\u62e9SX1278\u6a21\u5757\u7684\u6700\u4f73\u4fe1\u9053\u8bbe\u7f6e\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u6765\u51b3\u5b9a\u9891\u6bb5\u548c\u8c03\u5236\u65b9\u5f0f\u3002<\/p>\n\n\n\n \u3000\u3000SX1278\u6a21\u5757\u4e0e\u5176\u4ed6LoRa\u6a21\u5757\u76f8\u6bd4\uff0c\u5177\u6709\u4ee5\u4e0b\u72ec\u7279\u7684\u4f18\u52bf\u548c\u7279\u70b9\uff1a<\/p>\n\n\n\n SX1278\u6a21\u5757\u7684\u5730\u5740\u548c\u4fe1\u9053\u8bbe\u7f6e\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u9700\u6c42\u8fdb\u884c\u8be6\u7ec6\u914d\u7f6e\uff0c\u5305\u62ec\u9009\u62e9\u5408\u9002\u7684\u9891\u6bb5\u3001\u8c03\u6574\u5e26\u5bbd\u548c\u6269\u9891\u56e0\u5b50\u4ee5\u53ca\u9009\u62e9\u5408\u9002\u7684\u8c03\u5236\u65b9\u5f0f\u3002<\/p>\n","protected":false},"author":1,"featured_media":93059,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[54],"class_list":["post-94120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-l-2"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/94120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=94120"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/94120\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/93059"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=94120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=94120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=94120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\u3000\u3000\u4e00\u3001 SX1278\u6a21\u5757\u5728\u4e0d\u540c\u9891\u6bb5\u4e0b\u7684\u6027\u80fd\u8868\u73b0\u548c\u9650\u5236\u662f\u4ec0\u4e48?<\/h2>\n\n\n\n
\u3000\u30001. \u5728\u4e0d\u540c\u9891\u6bb5\u4e0b\uff0cSX1278\u6a21\u5757\u7684\u6027\u80fd\u8868\u73b0\u548c\u9650\u5236\u5982\u4e0b\uff1a<\/h3>\n\n\n\n
\u3000\u30002. \u6027\u80fd\u8868\u73b0<\/h3>\n\n\n\n
\u3000\u30003. \u9650\u5236<\/h3>\n\n\n\n
\u3000\u3000\u4e8c\u3001 \u5982\u4f55\u901a\u8fc7\u7f16\u7a0b\u7cbe\u786e\u8bbe\u7f6eSX1278\u6a21\u5757\u7684\u5e26\u5bbd\u548c\u6269\u9891\u56e0\u5b50\u4ee5\u4f18\u5316\u8fdc\u8ddd\u79bb\u6570\u636e\u4f20\u8f93?<\/h2>\n\n\n\n
\u3000\u3000\u4e09\u3001 SX1278\u6a21\u5757\u652f\u6301\u7684SPI\u63a5\u53e3\u914d\u7f6e\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\u662f\u4ec0\u4e48?<\/h2>\n\n\n\n
\u3000\u30001. \u914d\u7f6e\u6b65\u9aa4<\/h3>\n\n\n\n
\u3000\u30002. \u793a\u4f8b\u4ee3\u7801<\/h3>\n\n\n\n
\u3000\u3000\u56db\u3001 \u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5982\u4f55\u6839\u636e\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u9009\u62e9SX1278\u6a21\u5757\u7684\u6700\u4f73\u4fe1\u9053\u8bbe\u7f6e?<\/h2>\n\n\n\n
\u3000\u3000\u4e94\u3001 SX1278\u6a21\u5757\u4e0e\u5176\u4ed6LoRa\u6a21\u5757\u76f8\u6bd4\uff0c\u6709\u54ea\u4e9b\u72ec\u7279\u7684\u4f18\u52bf\u548c\u7279\u70b9?<\/h2>\n\n\n\n
\n