{"id":7137,"date":"2016-07-31T19:12:37","date_gmt":"2016-07-31T11:12:37","guid":{"rendered":"http:\/\/www.ifroglab.com\/?p=7137"},"modified":"2016-07-31T19:12:57","modified_gmt":"2016-07-31T11:12:57","slug":"arduino-3-3-version-with-il-lora1272-demo-%e6%95%99%e5%ad%b8","status":"publish","type":"post","link":"https:\/\/www.ifroglab.com\/tw\/?p=7137","title":{"rendered":"Arduino 3.3V version with IL-LORA1272 Demo \u6559\u5b78"},"content":{"rendered":"<p>HI<\/p>\n<p>\u5927\u5bb6\u597d&#8230;\u56e0\u70ba\u6700\u8fd1\u6709\u592a\u591a\u7684\u670b\u53cb\u5728\u554f\u5c0f\u7de8\u5982\u4f55\u904b\u7528iForglab\u7684LORA module\u4e26\u900f\u904eArduino\u7684\u65b9\u5f0f\u4f86\u8ddf\u6e9d\u901a\u3002<\/p>\n<p>\u6211\u4f86\u8ddf\u5404\u4f4d\u4f5c\u4e00\u500b\u89e3\u91cb\uff0c\u6211\u5011\u5df2\u7d93\u628a\u5c0d\u61c9\u7684LORA module\u7684\u7bc4\u4f8b\u7a0b\u5f0f\u5df2\u7d93\u653e\u4e0aGithub\u4e86\u3002<\/p>\n<p><a href=\"http:\/\/Samples-Arduino\/arduino_LORA\">https:\/\/github.com\/iFrogLab\/IL-LORA1272\/tree\/master\/Samples-Arduino\/arduino_LORA<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>1.H\/W \u786c\u9ad4\u9023\u63a5\u65b9\u5f0f.<\/p>\n<ul>\n<li>\u5229\u75283.3v\u7684Arduino(Seedduino v4.2)\u7684\u677f\u5b50\u9023\u63a5LORA MOdule\n<ul>\n<li>3.3V<\/li>\n<li>Gnd<\/li>\n<li>SW TX(Pin 10)<\/li>\n<li>SW RX(Pin 11)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/IMG_0701.jpg\" rel=\"attachment wp-att-7138\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7138 size-medium\" src=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/IMG_0701-e1469960547221-225x300.jpg\" alt=\"IMG_0701\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/IMG_0701-e1469960547221-225x300.jpg 225w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/IMG_0701-e1469960547221-600x800.jpg 600w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/IMG_0701-e1469960547221-768x1024.jpg 768w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p>2.\u3000S\/W\u8edf\u9ad4\u5728Arduino IDE\u4e0a\u7684\u8a02\u7fa9<\/p>\n<p>\/\/&#8211;\u5df2\u4e0b\u70baArduino\u7684\u7a0b\u5f0f\/\/<\/p>\n<p>#include &lt;SoftwareSerial.h&gt;<\/p>\n<p>SoftwareSerial mySerial(10, 11); \/\/ RX, TX<\/p>\n<p>void setup() {<br \/>\n\/\/ Open serial communications and wait for port to open:<br \/>\nSerial.begin(9600); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/<span style=\"color: #000000;\">&lt;-\u8a2d\u5b9a\u786c\u9ad4UART\u7684BaudRate\u70ba9600<\/span><br \/>\nwhile (!Serial) {<br \/>\n; \/\/ wait for serial port to connect. Needed for native USB port only<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>Serial.println(&#8220;HI The LORA is online now&#8221;);<\/p>\n<p>\/\/ set the data rate for the SoftwareSerial port<br \/>\nmySerial.begin(115200); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/&lt;-\u8a2d\u5b9a\u8edf\u9ad4UART\u7684Baudrate\u70ba115200(\u9019\u662f\u70ba\u4e86\u8ddfLORA module\u6e9d\u901a\u6240\u9700\u8981\u7684Baudrate)<br \/>\nFunLora_0_GetChipID(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ \u900f\u904eSW UART\u8207LORA modue\u53d6\u5f97\u7248\u672c\u8cc7\u6599<br \/>\ndelay(200);<\/p>\n<p>FunLora_1_Init(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/\u900f\u904eSW UART\u5c0dLORA Module\u4f5c\u521d\u59cb\u5316\u3002<br \/>\ndelay(200);<br \/>\nFunLora_2_ReadSetup(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/\u8b80\u53d6LORA Module\u521d\u59cb\u5316\u8a2d\u5b9a\u8cc7\u6599\u3002<br \/>\ndelay(200);<br \/>\nFunLora_3_Setup(3); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/\u8a2d\u5b9a\u8a72LORA Module\u70ba\u63a5\u6536\u6a21\u5f0f, [ e.g FunLora_3_Stup(3)==&gt;\u70ba\u63a5\u6536\\\u6a21\u5f0f;FunLora_3_Stup(2)==&gt;\u70ba\u767c\u5c04\u6a21\u5f0f ]<br \/>\ndelay(200);<\/p>\n<p>FunLora_6_read(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/\u5f9eLORA module Buffer \u8b80\u53d6\u8cc7\u6599\u3002<br \/>\ndelay(200);<\/p>\n<p>Serial.println(&#8220;&#8212;&#8212;-&#8220;);<\/p>\n<p>FunLora_3_Setup(2); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/\u8a2d\u5b9a\u8a72LORA Module\u70ba\u767c\u5c04\u6a21\u5f0f\uff0c[ e.g FunLora_3_Stup(3)==&gt;\u70ba\u63a5\u6536\\\u6a21\u5f0f\uff1bFunLora_3_Stup(2)==&gt;\u70ba\u767c\u5c04\u6a21\u5f0f \u3002]<br \/>\ndelay(200);<br \/>\nFunLora_5_write(); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/\u5f9eLORA module Buffer \u5beb\u5165\u8cc7\u6599\u3002<br \/>\ndelay(200);<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>\u53ea\u8981\u63a5\u7dda\u6b63\u78ba\uff0c\u61c9\u8a72\u5c31\u53ef\u4ee5\u5728\u4f60\u7684Arduino IDE\u4e0a\u770b\u5230\u6b63\u78ba\u7684\u8cc7\u6599\u56de\u61c9\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/Arduino_LORA.jpg\" rel=\"attachment wp-att-7139\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7139\" src=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/Arduino_LORA-300x201.jpg\" alt=\"Arduino_LORA\" width=\"300\" height=\"201\" srcset=\"https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Arduino_LORA-300x201.jpg 300w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Arduino_LORA-600x402.jpg 600w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Arduino_LORA-768x515.jpg 768w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Arduino_LORA-1024x686.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u5c0d\u65bcModule\u6240\u56de\u61c9\u7684\u8cc7\u6599\u6709\u770b\u4e0d\u61c2\u7684\u5730\u65b9\uff0c\u8acb\u6aa2\u67e5\u4e00\u4e0b\u6211\u5011\u7684UART command(\u547d\u4ee4)\u8868!<\/p>\n<ul>\n<li>\u8a72UART COMMAND table\u8acb\u5728\u65bc\u8cfc\u8cb7\u5f8c\u8ddf\u6211\u5011\u8a62\u554f!<\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/Excel-table.jpg\" rel=\"attachment wp-att-7140\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-7140\" src=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/Excel-table-300x157.jpg\" alt=\"Excel table\" width=\"300\" height=\"157\" srcset=\"https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Excel-table-300x157.jpg 300w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Excel-table-600x313.jpg 600w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Excel-table-768x401.jpg 768w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/Excel-table-1024x535.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/IMG_0702.jpg\" rel=\"attachment wp-att-7143\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-7143 size-medium\" src=\"http:\/\/www.ifroglab.com\/wp-content\/uploads\/2016\/07\/IMG_0702-e1469963340544-225x300.jpg\" alt=\"IMG_0702\" width=\"225\" height=\"300\" srcset=\"https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/IMG_0702-e1469963340544-225x300.jpg 225w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/IMG_0702-e1469963340544-600x800.jpg 600w, https:\/\/www.ifroglab.com\/tw\/wp-content\/uploads\/2016\/07\/IMG_0702-e1469963340544-768x1024.jpg 768w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HI \u5927\u5bb6\u597d&#8230;\u56e0\u70ba\u6700\u8fd1\u6709\u592a\u591a\u7684\u670b\u53cb\u5728\u554f\u5c0f\u7de8\u5982\u4f55\u904b\u7528iForglab\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7143,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-7137","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/posts\/7137"}],"collection":[{"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7137"}],"version-history":[{"count":3,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/posts\/7137\/revisions"}],"predecessor-version":[{"id":7145,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/posts\/7137\/revisions\/7145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=\/wp\/v2\/media\/7143"}],"wp:attachment":[{"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ifroglab.com\/tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}