{"id":445,"date":"2016-04-02T01:37:15","date_gmt":"2016-04-02T01:37:15","guid":{"rendered":"https:\/\/www.thebillplease.io\/play\/?p=445"},"modified":"2022-01-19T03:21:34","modified_gmt":"2022-01-19T03:21:34","slug":"esp8266-with-rfm69-using-lowpowerlab","status":"publish","type":"post","link":"https:\/\/www.thebillplease.io\/play\/2016\/04\/02\/esp8266-with-rfm69-using-lowpowerlab\/","title":{"rendered":"ESP8266 with RFM69 using Lowpowerlab"},"content":{"rendered":"<p>UPDATE: interesting new git project:\u00a0<a href=\"https:\/\/github.com\/bbx10\/nanohab\">https:\/\/github.com\/bbx10\/nanohab <\/a>I&#8217;ll want to try it out soon!<\/p>\n<p>I stumbled upon two different communities working on incorporating RFM into an ESP8266 environment or vice versa: Mysensors.org and Lowpowerlab.<\/p>\n<p>My previous post discussed pinout for mysensors library. But, given that the funky&#8217;s I&#8217;m using worked so well with the Lowpowerlab library, I decided to look at leveraging their library to be run on the ESP8266.<\/p>\n<table class=\"tg\" style=\"height: 145px;\" width=\"499\">\n<tbody>\n<tr>\n<th class=\"tg-031e\">Pin Name<\/th>\n<th class=\"tg-031e\">ESP8266 GPIO #<\/th>\n<th class=\"tg-031e\">ESP8266 HSPI Function<\/th>\n<th class=\"tg-031e\">RFM69 Pin<\/th>\n<th class=\"tg-031e\">Arduino<\/th>\n<\/tr>\n<tr>\n<td class=\"tg-031e\">MTDI<\/td>\n<td class=\"tg-031e\">GPIO12<\/td>\n<td class=\"tg-031e\">MISO (DIN)<\/td>\n<td class=\"tg-031e\">MISO<\/td>\n<td class=\"tg-031e\">12<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-031e\">MTCK<\/td>\n<td class=\"tg-031e\">GPIO13<\/td>\n<td class=\"tg-031e\">MOSI (DOUT)<\/td>\n<td class=\"tg-031e\">MOSI<\/td>\n<td class=\"tg-031e\">11<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-031e\">MTMS<\/td>\n<td class=\"tg-031e\">GPIO14<\/td>\n<td class=\"tg-031e\">CLOCK<\/td>\n<td class=\"tg-031e\">\u00a0SCK<\/td>\n<td class=\"tg-031e\">\u00a013<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-031e\">MTDO<\/td>\n<td class=\"tg-031e\">GPIO15<\/td>\n<td class=\"tg-031e\">\u00a0CS \/ SS (Select Slave)<\/td>\n<td class=\"tg-031e\">\u00a0NSS<\/td>\n<td class=\"tg-031e\">\u00a010<\/td>\n<\/tr>\n<tr>\n<td class=\"tg-031e\"><\/td>\n<td class=\"tg-031e\">GPIO4<\/td>\n<td class=\"tg-031e\">\u00a0IRQ (Interrupt)<\/td>\n<td class=\"tg-031e\">DIO0<\/td>\n<td class=\"tg-031e\">2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Rev A of the Huzzah ESP8266\u00a0board has GPIO #4 and #5 swapped (the modules changed pinouts on us)<\/p>\n<ul>\n<li><strong>MISO<\/strong> (Master In Slave Out) &#8211; The Slave line for sending data to the master,<\/li>\n<li><strong>MOSI<\/strong> (Master Out Slave In) &#8211; The Master line for sending data to the peripherals,<\/li>\n<li><strong>SCK<\/strong> (Serial Clock) &#8211; The clock pulses which synchronize data transmission generated by the master<\/li>\n<\/ul>\n<p>and one line specific for every device:<\/p>\n<ul>\n<li><strong>SS<\/strong> (Slave Select) &#8211; the pin on each device that the master can use to enable and disable specific devices.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1342\" src=\"https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69_png__691\u00d7784_-320x320-1.png\" alt=\"\" width=\"320\" height=\"320\" srcset=\"https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69_png__691\u00d7784_-320x320-1.png 320w, https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69_png__691\u00d7784_-320x320-1-300x300.png 300w, https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69_png__691\u00d7784_-320x320-1-150x150.png 150w, https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69_png__691\u00d7784_-320x320-1-80x80.png 80w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1185\" src=\"https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69-320x320-1.png\" alt=\"\" width=\"320\" height=\"320\" srcset=\"https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69-320x320-1.png 320w, https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69-320x320-1-300x300.png 300w, https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69-320x320-1-150x150.png 150w, https:\/\/www.thebillplease.io\/play\/wp-content\/uploads\/2022\/01\/HUZAAHRFM69-320x320-1-80x80.png 80w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/p>\n<p>Per Joelucid<\/p>\n<p>Then in RFM69.h:<\/p>\n<pre class=\"lang:default decode:true \">#define RF69_IRQ_PIN\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4\n#define RF69_IRQ_NUM\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 4<\/pre>\n<p>Then from the lowerPowerLab sketch change CS to 15<\/p>\n<pre class=\"lang:default decode:true \">radio.setCS(15);<\/pre>\n<p><a href=\"https:\/\/lowpowerlab.com\/forum\/index.php\/topic,1389.0.html\">https:\/\/lowpowerlab.com\/forum\/index.php\/topic,1389.0.html<\/a><\/p>\n<blockquote><p>&#8221;<\/p>\n<p>To make matters more interesting, I&#8217;m using Martin&#8217;s Funky V3 with my RFM69.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1211\" src=\"https:\/\/www.thebillplease.io\/wp-content\/uploads\/2022\/01\/funky-top-1-600x450-1-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" \/><\/p><\/blockquote>\n<p>In his version of the LowPowerLab&#8217;s Struct_Receive\/Send, he sets the CS Pin to 10. I&#8217;ll try changing that to 15 in the ESP code to see if it works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE: interesting new git project:\u00a0https:\/\/github.com\/bbx10\/nanohab I&#8217;ll want to try it out soon! I stumbled upon two different communities working on incorporating RFM into an ESP8266 environment or vice versa: Mysensors.org and Lowpowerlab. My previous&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":1223,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-internet-of-things"],"_links":{"self":[{"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":2,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":1704,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/posts\/445\/revisions\/1704"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/media\/1223"}],"wp:attachment":[{"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thebillplease.io\/play\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}