{"id":1223,"date":"2022-03-16T09:42:53","date_gmt":"2022-03-16T09:42:53","guid":{"rendered":"http:\/\/lora.vsb.cz\/?page_id=1223"},"modified":"2024-10-28T13:00:23","modified_gmt":"2024-10-28T13:00:23","slug":"adafruit-feather-32u4","status":"publish","type":"page","link":"https:\/\/lora.vsb.cz\/index.php\/adafruit-feather-32u4\/","title":{"rendered":"868 MHz Adafruit Feather 32u4"},"content":{"rendered":"<table style=\"height: 66px;\" width=\"356\">\n<tbody>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>TTN version:<\/strong><\/td>\n<td><strong><span style=\"color: #008000;\">TTNv3 \/ TTS SANDBOX<br \/>\n<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Activation:<\/strong><\/td>\n<td>ABP<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Device Class:<\/strong><\/td>\n<td>Class A<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Last revision:<\/strong><\/td>\n<td>October 28, 2024<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>At the <strong>Feather 32u4<\/strong>&#8218;s heart is at ATmega32u4 clocked at 8 MHz and at 3.3V logic.\u00a0<strong>Feather 32u4 LoRa Radio<\/strong>\u00a0uses the extra space left over to add\u00a0an RFM9x LoRa 868\/915 MHz radio module. We use 868 MHz one. <strong><a href=\"https:\/\/www.adafruit.com\/product\/3078\" target=\"_blank\" rel=\"noopener\">See complete specification here<\/a><\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1368 aligncenter\" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/04\/Adafruit_Feather_LoRa.jpg\" alt=\"Adafruit Feather 32u4 board\" width=\"450\" height=\"287\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/04\/Adafruit_Feather_LoRa.jpg 784w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/04\/Adafruit_Feather_LoRa-300x191.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/04\/Adafruit_Feather_LoRa-768x490.jpg 768w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<h2><span style=\"color: #189bd6;\"><strong>Prepare<\/strong><\/span><\/h2>\n<ul>\n<li>Adafruit Feather 32u4 RFM95 LoRa Radio<\/li>\n<li>1x wire<\/li>\n<li>breadboard (optional)<\/li>\n<li>PC + micro USB cable<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Arduino IDE setup<\/span><\/strong><\/h2>\n<ol>\n<li>Download <strong><a href=\"https:\/\/www.arduino.cc\/en\/software\" target=\"_blank\" rel=\"noopener\">Arduino IDE<\/a><\/strong>.<\/li>\n<li>Run Arduino IDE.<\/li>\n<li style=\"text-align: left;\">In the Arduino IDE <strong>File -&gt; Preferences <\/strong>copy and paste the link below into the <strong>Additional Boards Manager URLs<\/strong>.<br \/>\n<code>https:\/\/adafruit.github.io\/arduino-board-index\/package_adafruit_index.json<\/code><\/li>\n<li>Click OK.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2905 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"500\" height=\"335\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2.png 805w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2-300x201.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2-768x515.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2-272x182.png 272w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<li>Install the Adafruit boards via <strong>Boards Manager -&gt; <\/strong>search <strong>Adafruit AVR Boards -&gt; Install<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2906 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup3.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"300\" height=\"287\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup3.png 372w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup3-300x287.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>You should see in <strong>Tools -&gt; Board -&gt; Adafruit AVR Boards<\/strong> the Adafruit Feather 32u4.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2907 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup4.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"501\" height=\"308\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup4.png 943w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup4-300x185.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup4-768x472.png 768w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/li>\n<li>Connect Adafruit Feather 32u4 using micro USB cable to your computer.<\/li>\n<li>Choose the appropriate COM port which is used for communication with Adafruit.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2908 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup5.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"299\" height=\"171\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup5.png 374w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup5-300x172.png 300w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #800000;\"><strong>MCCI LoRaWAN LMIC library setup<\/strong><\/span><\/h2>\n<ol>\n<li>In the Arduino IDE <strong>Library Manager<\/strong>\u00a0search <strong>MCCI LoRaWAN LMIC library<\/strong> by Terry Moore and install it.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2909 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup6.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"250\" height=\"403\" \/><\/li>\n<\/ol>\n<h4><strong>ABP configuration for Adafruit Feather 32u4<\/strong><\/h4>\n<ol>\n<li>On Windows open <strong>lmic_project_config.h<\/strong> located in <strong>\\Documents\\Arduino\\libraries\\MCCI_LoRaWAN_LMIC_library\\project_config\\<\/strong><\/li>\n<li>Change project definitions to definitions listed bellow and save it:<\/li>\n<\/ol>\n<pre style=\"padding-left: 40px;\">\/\/ project-specific definitions\r\n#define CFG_eu868 1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/for Europe (change it based on your location)\r\n#define CFG_sx1276_radio 1\r\n#define DISABLE_JOIN 1\r\n#define DISABLE_PING 1\r\n#define DISABLE_BEACONS 1\r\n#define DISABLE_MCMD_DlChannelReq 1<\/pre>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #800000;\"><strong>Add Adafruit Feather 32u4 into The Things Stack<\/strong><\/span><\/h2>\n<ol>\n<li><a href=\"https:\/\/www.thethingsnetwork.org\/login?next=\/\" target=\"_blank\" rel=\"noopener\"><strong>Create an account<\/strong><\/a> on The Things Network if you don&#8217;t have one.<\/li>\n<li><strong>Login<\/strong> on <a href=\"https:\/\/www.thethingsnetwork.org\/login?next=\/\" target=\"_blank\" rel=\"noopener\"><strong>The Things Network<\/strong><\/a>.<\/li>\n<li>Click on your username and choose <strong>Console<\/strong>.<\/li>\n<li>Select\u00a0a network cluster .<\/li>\n<\/ol>\n<h4><strong>Add application<\/strong><\/h4>\n<ol>\n<li><strong>Go to applications<\/strong>.<\/li>\n<li>Click on button <strong>+ Add application<\/strong>.<\/li>\n<li>Write something into <strong>Application ID<\/strong>.<\/li>\n<li>Click on button <strong>Create application<\/strong>.<\/li>\n<\/ol>\n<h4><strong>Add end device<\/strong><\/h4>\n<ol>\n<li>In your application click on button <strong>+ Register end device<\/strong>.<\/li>\n<li>Input Method &#8211; Choose <strong>Enter end device specifics manually<\/strong>.<\/li>\n<li>Frequency plan &#8211; <span style=\"color: #000000;\"><strong>Europe 863-870 MHz (SF9 for RX2 &#8211; recommended)<\/strong><\/span><\/li>\n<li>LoRaWAN version &#8211; <strong>LoRaWAN Specification 1.0.3<\/strong><\/li>\n<li>Click on <strong>Show advanced activation, LoRaWAN class and cluster settings<\/strong><\/li>\n<li>Activation mode &#8211; <strong>Activation by personalization (ABP)<\/strong><\/li>\n<li>Additional LoRaWAN class capabilities &#8211; <strong>None (class A only)<\/strong><\/li>\n<li><strong>Deselect<\/strong> &#8211; Use network&#8217;s default MAC settings<\/li>\n<li>Rx1 data rate offset = <strong>0<\/strong><\/li>\n<li>Rx1 delay = <strong>1<\/strong><\/li>\n<li>Resets frame counters &#8211; <strong>Enabled<\/strong><\/li>\n<li>Rx2 data rate = <strong>3<\/strong><\/li>\n<li>Rx2 frequency = <strong>869,525 MHz<\/strong><\/li>\n<li>Add entry = <strong>868100000<\/strong><\/li>\n<li>Add entry = <strong>868300000<\/strong><\/li>\n<li>Add entry = <strong>868500000<\/strong><\/li>\n<li>Add entry = <strong>867100000<\/strong><\/li>\n<li>Add entry = <strong>867300000<\/strong><\/li>\n<li>Add entry = <strong>867500000<\/strong><\/li>\n<li>Add entry = <strong>867700000<\/strong><\/li>\n<li>Add entry = <strong>867900000<\/strong><\/li>\n<li>DevEUI &#8211; <strong>Generate<\/strong><\/li>\n<li>Device address &#8211; <strong>Generate<\/strong><\/li>\n<li>AppSKey &#8211; <strong>Generate<\/strong><\/li>\n<li>NwkSKey &#8211; <strong>Generate<\/strong><\/li>\n<li>End device ID &#8211; here you can name your device<\/li>\n<li>After registration &#8211; <strong>View registered end device<\/strong><\/li>\n<li>Click on button <strong>Register end device<\/strong><\/li>\n<li>Click on <strong>Settings<\/strong><\/li>\n<li>Network layer &#8211; <strong>Expand<\/strong><\/li>\n<li>Click on <strong>Advanced MAC settings<\/strong><\/li>\n<li>Desired Rx1 delay = <strong>1<\/strong><\/li>\n<li>Adaptive data rate (ADR) \u2013\u00a0<strong>Dynamic mode<\/strong><\/li>\n<li>Click on button <strong>Save changes<\/strong><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #800000;\"><strong>Sending &#8222;Hello LoRa!&#8220; to TTS<\/strong><\/span><\/h2>\n<ol>\n<li><span style=\"color: #ff0000;\"><strong>First of all wire up the board&#8217;s IO1 pin with pin 6.<br \/>\n<\/strong><\/span><span style=\"color: #ff0000;\"><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1288 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4.png\" alt=\"Adafruit Feather 32u4 board\" width=\"380\" height=\"261\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4.png 941w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4-300x206.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4-768x527.png 768w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1241 alignnone\" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4_Hello_LoRa-300x183.jpg\" alt=\"wire_between_pins\" width=\"429\" height=\"261\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4_Hello_LoRa-300x183.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/03\/AF32u4_Hello_LoRa-rotated.jpg 714w\" sizes=\"auto, (max-width: 429px) 100vw, 429px\" \/><\/strong><\/strong><\/span><\/li>\n<li style=\"text-align: left;\">In <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Payload formatters -&gt; Uplink<\/strong> change <strong>Formatter type<\/strong> to <strong>Custom Javascript formatter <\/strong>and to <strong>Formatter code<\/strong> copy and paste code bellow:\n<pre><span style=\"color: #333399;\"><em>function<\/em><\/span> <span style=\"color: #ff0000;\">Decoder<\/span>(bytes, port) { \r\n   <em><span style=\"color: #333399;\">return<\/span><\/em> {\r\n          mydata: String.fromCharCode.<span style=\"color: #ff0000;\">apply<\/span>(<span style=\"color: #993300;\">null<\/span>, bytes) \/\/ Decode plain text\r\n   };\r\n}<\/pre>\n<\/li>\n<li><strong>Save changes<\/strong><\/li>\n<li>To your Arduino IDE copy and paste program<strong> <a href=\"https:\/\/github.com\/OndrejKnebl\/TTNv3-LoRaVSB\/blob\/main\/Sending_Hello_LoRa\/Sending_Hello_LoRa.ino\" target=\"_blank\" rel=\"noopener\">Sending Hello LoRa<\/a><\/strong>.<\/li>\n<li>In program replace <strong>NWKSKEY<\/strong>, <strong>APPSKEY<\/strong> and <strong>DEVADDR<\/strong> with keys of your end device registred in TTS. Keys are in <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Device overview -&gt; Session information<\/strong>.<\/li>\n<li>Connect Adafruit Feather 32u4 using micro USB cable to your computer.<\/li>\n<li>Choose the appropriate COM port which is used for communication with Adafruit.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2908 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup5.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"299\" height=\"171\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup5.png 374w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup5-300x172.png 300w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/li>\n<li>In Arduino IDE click on <strong>Upload<\/strong> button to upload program to your Adafruit Feather 32u4.<\/li>\n<li>In Arduino IDE click on <strong>Serial Monitor <\/strong>button and you should <strong>every +-1 minute<\/strong>\u00a0see <span style=\"color: #000000;\">&#8222;Sending &#8211; Hello, LoRa!&#8220;<\/span>:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2910 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_SerialMonitor.png\" alt=\"Adafruit 32u4 Arduino2 Serial Monitor\" width=\"780\" height=\"308\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_SerialMonitor.png 920w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_SerialMonitor-300x118.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_SerialMonitor-768x303.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/li>\n<li>In <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Live data<\/strong> you should see this:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1859 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/TTS_Hello_Lora.png\" alt=\"TTS_Hello_Lora\" width=\"779\" height=\"355\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/TTS_Hello_Lora.png 1562w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/TTS_Hello_Lora-300x137.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/TTS_Hello_Lora-1024x467.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/TTS_Hello_Lora-768x350.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/TTS_Hello_Lora-1536x700.png 1536w\" sizes=\"auto, (max-width: 779px) 100vw, 779px\" \/><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>TTN version: TTNv3 \/ TTS SANDBOX Activation: ABP Device Class: Class A Last revision: October 28, 2024 At the Feather 32u4&#8218;s heart is at ATmega32u4 clocked at 8 MHz and at 3.3V logic.\u00a0Feather 32u4 LoRa Radio\u00a0uses the extra space left over to add\u00a0an RFM9x LoRa 868\/915 MHz radio module. We use 868 MHz one. See [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1223","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/1223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/comments?post=1223"}],"version-history":[{"count":56,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/1223\/revisions"}],"predecessor-version":[{"id":8180,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/1223\/revisions\/8180"}],"wp:attachment":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/media?parent=1223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}