{"id":1540,"date":"2020-06-27T19:25:56","date_gmt":"2020-06-27T19:25:56","guid":{"rendered":"https:\/\/thezhut.com\/?page_id=1540"},"modified":"2020-06-28T20:16:30","modified_gmt":"2020-06-28T20:16:30","slug":"nrf24l01-arduino-rc-joystick","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=1540","title":{"rendered":"NRF24L01 ARDUINO RC Joystick"},"content":{"rendered":"<h1 style=\"text-align: center;\">How To Build Wire &amp; Program The NRF24L01 ARDUINO RC Joystick.<\/h1>\n<p><a href=\"https:\/\/youtu.be\/vGlhUZnV3fs\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1551 aligncenter\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_thumb-300x169.jpg\" alt=\"\" width=\"561\" height=\"316\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_thumb-300x169.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_thumb-1024x576.jpg 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_thumb-768x432.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_thumb.jpg 1280w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/a><\/p>\n<h1 style=\"text-align: center;\"><strong><a href=\"https:\/\/youtu.be\/vGlhUZnV3fs\" target=\"_blank\" rel=\"noopener noreferrer\">Click Here For Video Tutorial.<\/a><\/strong><\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1558\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-300x300.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-1024x1024.jpg 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-150x150.jpg 150w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-768x768.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-1536x1536.jpg 1536w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0001-2048x2048.jpg 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1559\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-300x300.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-1024x1024.jpg 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-150x150.jpg 150w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-768x768.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-1536x1536.jpg 1536w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0002-2048x2048.jpg 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1560\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-300x300.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-1024x1024.jpg 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-150x150.jpg 150w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-768x768.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-1536x1536.jpg 1536w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joystick0003-2048x2048.jpg 2048w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h1 style=\"text-align: center;\"><strong>Check us out on Facebook: <a href=\"https:\/\/www.facebook.com\/zarduino\/\">https:\/\/www.facebook.com\/zarduino\/<\/a><\/strong><\/h1>\n<h1><em><strong>PARTS LIST:<\/strong><\/em><\/h1>\n<p>#affiliate links#<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=NRF24L01+&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=f0b507ccd472da272a39e177db4e18d6\" target=\"_blank\" rel=\"noopener noreferrer\">NRF24L01+<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=NRF24L01+ Breakout Board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=81a8a37c1ac4f8bc05d1fa012e615e97\" target=\"_blank\" rel=\"noopener noreferrer\">NRF24L01+ Breakout Board<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ARDUINO pro mini&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=7abb54ee6b8c7eb0bb8a166cf9f72061\" target=\"_blank\" rel=\"noopener noreferrer\">ARDUINO Board<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=Mini Breadboard&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=6712a7dce8397b4182e3da684a9f1794\" target=\"_blank\" rel=\"noopener noreferrer\">Mini Breadboard<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=1\u00b5F Capacitors&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=d04bf21b2862f1a8441d27f22bd4a386\" target=\"_blank\" rel=\"noopener noreferrer\">2 X 1\u00b5F Capacitors<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=Rectifier Diode&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=b3b128df198fc561d033d0f1fd653935\" target=\"_blank\" rel=\"noopener noreferrer\">Rectifier Diode<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=10cm jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=80ac3019749922454786dff4fe939ecf\" target=\"_blank\" rel=\"noopener noreferrer\">Jumper Wires<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=L7805CV voltage Regulator&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=3d8672f2c54a2e60ab5d2efa13409838\" target=\"_blank\" rel=\"noopener noreferrer\">L7805CV voltage Regulator<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/product\/B01N59MK0U\/ref=as_li_qf_asin_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B01N59MK0U&amp;linkId=2108107c21d19777c0f13c04ef3e88db\" target=\"_blank\" rel=\"noopener noreferrer\">2 X joystick modules<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=9 Volt Battery Connector&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=5d961e1007b9f5ea39fa65bfe4e61859\" target=\"_blank\" rel=\"noopener noreferrer\">9 Volt Battery Connector<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=9 volt Battery&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=06bac7ca1b9167273a35799624943ecf\" target=\"_blank\" rel=\"noopener noreferrer\">9 volt Battery<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=Rubber Band&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=1060c6095f343fbd85297976d169a964\" target=\"_blank\" rel=\"noopener noreferrer\">Rubber Band<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=m2x8 nuts and bolts&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=dad7fe4f398e1a5ef885fa2b3fa9b17a\" target=\"_blank\" rel=\"noopener noreferrer\">5 X M2*8 nuts, bolts and washers<\/a><\/p>\n<p>#affiliate links#<\/p>\n<p style=\"text-align: center;\">=========================================================<\/p>\n<h1 style=\"text-align: center;\"><em><strong>\u00a0<a href=\"https:\/\/cults3d.com\/en\/3d-model\/gadget\/z3d-nrf24l01-arduino-rc-joystick\" target=\"_blank\" rel=\"noopener noreferrer\">\u00a0Click Here for The<\/a><\/strong><\/em><\/h1>\n<h1 style=\"text-align: center;\"><a href=\"https:\/\/cults3d.com\/en\/3d-model\/gadget\/z3d-nrf24l01-arduino-rc-joystick\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>STL Files For The Joystick Frame.<\/strong><\/em><\/a><\/h1>\n<p style=\"text-align: center;\">=========================================================<\/p>\n<h1 style=\"text-align: center;\"><strong>Click here to purchase a printed joystick frame.<\/strong><\/h1>\n<p style=\"text-align: center;\"><span style=\"color: #ff0000;\">(this option coming soon)<\/span><\/p>\n<p style=\"text-align: center;\">==========================================================<\/p>\n<h1><em><strong>SCHEMATIC&#8217;s:<\/strong><\/em><\/h1>\n<h1><em><strong>Joystick<\/strong><\/em><\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1544\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joy__31-300x231.jpg\" alt=\"\" width=\"584\" height=\"450\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joy__31-300x231.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joy__31-1024x790.jpg 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joy__31-768x593.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joy__31-1536x1185.jpg 1536w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/joy__31.jpg 1812w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>\n<h1><em><strong>Receiver<\/strong><\/em><\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1567\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_receiver_schem-300x200.jpg\" alt=\"\" width=\"596\" height=\"397\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_receiver_schem-300x200.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_receiver_schem-1024x684.jpg 1024w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_receiver_schem-768x513.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2020\/06\/protostick_receiver_schem.jpg 1437w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/p>\n<p><em style=\"font-size: 2.4em;\"><strong>ARDUINO CODE:<\/strong><\/em><\/p>\n<h2>TRANSMITER CODE:<\/h2>\n<p>#include &lt;SPI.h&gt;<br \/>\n#include &lt;RF24.h&gt;<br \/>\nRF24 radio(8, 9); \/\/ CE, CSN<br \/>\nconst byte address[6] = &#8220;00001&#8221;;<br \/>\nint joy[6];<\/p>\n<p>void setup() {<br \/>\nradio.begin();<br \/>\nradio.openWritingPipe(address);<br \/>\nradio.setDataRate(RF24_2MBPS); \/\/ Set Data Rate<br \/>\nradio.setPALevel(RF24_PA_HIGH); \/\/ Set Power LVL<br \/>\nradio.setChannel(0x4C); \/\/ Set Channel<br \/>\npinMode(4, INPUT_PULLUP); \/\/ Left stick button<br \/>\npinMode(5, INPUT_PULLUP); \/\/ Right stick button<br \/>\n\/\/ Serial.begin(9600); \/\/ For Testing<br \/>\n}<\/p>\n<p>void loop() {<\/p>\n<p>radio.stopListening();<br \/>\njoy[0] = analogRead(A0); \/\/ Right Stick Up-Down UP=0<br \/>\njoy[1] = analogRead(A1); \/\/ Right Stick Left-Right RIGHT=0<br \/>\njoy[2] = analogRead(A2); \/\/ Left Stick Up-Down UP=0<br \/>\njoy[3] = analogRead(A3); \/\/ Left Stick Left-Right RIGHT=0<br \/>\njoy[4] = digitalRead(4); \/\/ Left Push Button PUSHED=0<br \/>\njoy[5] = digitalRead(5); \/\/ Right Push Button PUSHED=0<br \/>\n\/* \/\/ For Testing<br \/>\nSerial.print(&#8220;A0 = &#8220;);<br \/>\nSerial.println(joy[0]);<br \/>\nSerial.print(&#8220;A1 = &#8220;);<br \/>\nSerial.println(joy[1]);<br \/>\nSerial.print(&#8220;A2 = &#8220;);<br \/>\nSerial.println(joy[2]);<br \/>\nSerial.print(&#8220;A3 = &#8220;);<br \/>\nSerial.println(joy[3]);<br \/>\nSerial.print(&#8220;LB = &#8220;);<br \/>\nSerial.println(joy[4]);<br \/>\nSerial.print(&#8220;RB = &#8220;);<br \/>\nSerial.println(joy[5]);<br \/>\nSerial.println(&#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8220;);<br \/>\ndelay(1000);<br \/>\n*\/<br \/>\njoy[0] = map(joy[0], 0, 1023, 255, 0);<br \/>\njoy[1] = map(joy[1], 0, 1023, 255, 0);<br \/>\njoy[2] = map(joy[2], 0, 1023, 255, 0);<br \/>\njoy[3] = map(joy[3], 0, 1023, 255, 0);<br \/>\n\/* \/\/ For Testing<br \/>\nSerial.print(&#8220;A0 = &#8220;);<br \/>\nSerial.println(joy[0]);<br \/>\nSerial.print(&#8220;A1 = &#8220;);<br \/>\nSerial.println(joy[1]);<br \/>\nSerial.print(&#8220;A2 = &#8220;);<br \/>\nSerial.println(joy[2]);<br \/>\nSerial.print(&#8220;A3 = &#8220;);<br \/>\nSerial.println(joy[3]);<br \/>\nSerial.print(&#8220;LB = &#8220;);<br \/>\nSerial.println(joy[4]);<br \/>\nSerial.print(&#8220;RB = &#8220;);<br \/>\nSerial.println(joy[5]);<br \/>\nSerial.println(&#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8220;);<br \/>\ndelay(1000);<br \/>\n*\/<br \/>\nradio.write(&amp;joy, sizeof(joy));<br \/>\ndelay(20);<br \/>\n}<\/p>\n<h2>RECEIVER CODE:<\/h2>\n<p>#include &lt;SPI.h&gt;<br \/>\n#include&lt;RF24.h&gt;<br \/>\nRF24 radio(7, 8); \/\/ CE, CSN<br \/>\nconst byte address[6] = &#8220;00001&#8221;;<br \/>\n#define led1 3<br \/>\n#define led2 5<br \/>\n#define led3 6<br \/>\n#define led4 9<br \/>\nint val[4];<\/p>\n<p>void setup() {<br \/>\npinMode(led1, OUTPUT);<br \/>\npinMode(led2, OUTPUT);<br \/>\npinMode(led3, OUTPUT);<br \/>\npinMode(led4, OUTPUT);<br \/>\nradio.begin();<br \/>\nradio.openReadingPipe(0, address);<br \/>\nradio.setDataRate(RF24_2MBPS);<br \/>\nradio.setPALevel(RF24_PA_HIGH);<br \/>\nradio.setChannel(0x4C);<br \/>\nradio.startListening();<br \/>\n}<\/p>\n<p>void loop() {<\/p>\n<p>delay(5);<br \/>\nradio.startListening();<br \/>\nwhile (!radio.available());<br \/>\nradio.read(&amp;val, sizeof(val));<br \/>\nanalogWrite(led1, val[0]);<br \/>\nanalogWrite(led2, val[1]);<br \/>\nanalogWrite(led3, val[2]);<br \/>\nanalogWrite(led4, val[3]);<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How To Build Wire &amp; Program The NRF24L01 ARDUINO RC Joystick. Click Here For Video Tutorial. Check us out on Facebook: https:\/\/www.facebook.com\/zarduino\/ PARTS LIST: #affiliate links# NRF24L01+ NRF24L01+ Breakout Board ARDUINO Board Mini Breadboard 2 X 1\u00b5F Capacitors Rectifier Diode &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=1540\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-1540","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1540"}],"version-history":[{"count":29,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1540\/revisions"}],"predecessor-version":[{"id":1579,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/1540\/revisions\/1579"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}