<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Basic RadioHead Sketches *barely* working on Two Unos - Arduino				            </title>
            <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/</link>
            <description>Discussion board for Robotics, Arduino, Raspberry Pi and other DIY electronics and modules. Join us today!</description>
            <language>en-US</language>
            <lastBuildDate>Wed, 12 Aug 2026 18:21:07 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-16047</link>
                        <pubDate>Sat, 06 Feb 2021 02:49:39 +0000</pubDate>
                        <description><![CDATA[@leonardo1123, Congratulations and well done.  I actually have a set of these on my wish list now.]]></description>
                        <content:encoded><![CDATA[<p>@leonardo1123, Congratulations and well done.  I actually have a set of these on my wish list now.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Centari</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-16047</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15633</link>
                        <pubDate>Sat, 30 Jan 2021 03:59:27 +0000</pubDate>
                        <description><![CDATA[@leonardo1123

 Posted by: @leonardo1123 
@noweare IT WORKS! I added a 5-failure timeout for transmission that totally solved the problem.

Also check out your library documentation... ...]]></description>
                        <content:encoded><![CDATA[<p>@leonardo1123</p>
<blockquote data-userid="3313" data-postid="15611" data-mention="leonardo1123">
<div class="wpforo-post-quote-author"><strong> Posted by: @leonardo1123 </strong></div>
<p><a title="noweare" href="https://forum.dronebotworkshop.com/profile/noweare/">@noweare</a> IT WORKS! I added a 5-failure timeout for transmission that totally solved the problem.</p>
</blockquote>
<p>Also check out your library documentation... you may well find member functions to consider in your design, such as: auto ack, crc check, etc...</p>
<p>Cheers.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>frogandtoad</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15633</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15613</link>
                        <pubDate>Fri, 29 Jan 2021 20:03:04 +0000</pubDate>
                        <description><![CDATA[That&#039;s great news!  Good job. Your a fast learner.]]></description>
                        <content:encoded><![CDATA[<p>That's great news!  Good job. Your a fast learner.</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>noweare</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15613</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15611</link>
                        <pubDate>Fri, 29 Jan 2021 18:38:38 +0000</pubDate>
                        <description><![CDATA[@noweare IT WORKS! I added a 5-failure timeout for transmission that totally solved the problem. Technically there&#039;s still a problem if both of them are listening, but that will go away when...]]></description>
                        <content:encoded><![CDATA[<p>@noweare IT WORKS! I added a 5-failure timeout for transmission that totally solved the problem. Technically there's still a problem if both of them are listening, but that will go away when I implement the ACTUAL code structure, in which they'll both be listening by default and then transmitting if they have new data. This transmission catch-check solves that problem completely though. </p>
<p>Thanks for sticking with me through this thread, I'm off to try to make a rudimentary sonar, I shall return in another thread if need be!</p>
<p>Once again, because I don't think it could be enough, Thank you. </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Leonardo1123</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15611</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15598</link>
                        <pubDate>Fri, 29 Jan 2021 14:50:55 +0000</pubDate>
                        <description><![CDATA[Add a timeout. If either radio does not recieve anything in X seconds then have one board turn into a RX and the other TX. Then TX sends. Might have to reinit the boards. Not sure.]]></description>
                        <content:encoded><![CDATA[<p>Add a timeout. If either radio does not recieve anything in X seconds then have one board turn into a RX and the other TX. Then TX sends. Might have to reinit the boards. Not sure.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>noweare</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15598</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15566</link>
                        <pubDate>Fri, 29 Jan 2021 04:18:00 +0000</pubDate>
                        <description><![CDATA[Okay @noweare I am sooooo close. I managed to get them to go back and forth an arbitrary number of times, but then they end up collapsing into a situation where they&#039;re both in the same stat...]]></description>
                        <content:encoded><![CDATA[<p>Okay @noweare I am <em>sooooo</em> close. I managed to get them to go back and forth an arbitrary number of times, but then they end up collapsing into a situation where they're both in the same state so they can't move forward. I took the getting started code, removed a lot of comments and extraneous code, but otherwise made no functional changes except for having them reverse roles automatically and putting the radio.start/stoplistening into the main loop so it did that correctly, as it was handled by the part that parsed for user input, which I removed. The same sketch is uploaded on both devices except for two spots I'll point out with comments.</p>
<p>I imagine what I need to do is either find a more concrete way to make sure their roles are opposite or else adding a way for them to be able to switch roles if their current role is failing but I don't know how I would implement that in a way that wouldn't leave it possible for both to flip from both false, to both true, etc. </p>
<p>Attached is a picture of the serial monitor of one of the devices.</p>
<p> </p>
<p>I'm super confused because the "reverse role" statement only happens when a transmission or reception occurs successfully, I don't know how they could be falling into the same role. </p>
2327
<p> </p>
<p>#include &lt;SPI.h&gt;<br />#include "printf.h"<br />#include "RF24.h"</p>
<p>RF24 radio(8, 10);</p>
<p>uint8_t address[] = {"1Node", "2Node"};<br />bool radioNumber = 0; // this is set to 1 on the other device<br />bool role = false;  // this is set to true on the other device<br />float payload = 0.0;</p>
<p>void setup() {</p>
<p>  Serial.begin(115200);</p>
<p>  radio.begin();<br />  radio.setPALevel(RF24_PA_LOW);<br />  radio.setPayloadSize(sizeof(payload));<br />  radio.openWritingPipe(address);<br />  radio.openReadingPipe(1, address);</p>
<p>} // setup</p>
<p>void loop() {<br />  if (role) {<br />    // This device is a TX node<br />    radio.stopListening();</p>
<p>    unsigned long start_timer = micros(); <br />    bool report = radio.write(&amp;payload, sizeof(float)); <br />    unsigned long end_timer = micros();</p>
<p>    if (report) {<br />      Serial.print(F("Transmission successful! ")); <br />      Serial.print(F("Time to transmit = "));<br />      Serial.print(end_timer - start_timer); <br />      Serial.print(F(" us. Sent: "));<br />      Serial.println(payload); <br />      payload += 0.01;</p>
<p>      role = !role;<br />    } else {<br />      Serial.println(F("Transmission failed or timed out")); <br />    }</p>
<p>    delay(1000); // slow transmissions down by 1 second</p>
<p>  } else {<br />    // This device is a RX node</p>
<p>    radio.startListening();<br />    uint8_t pipe;<br />    if (radio.available(&amp;pipe)) { <br />      uint8_t bytes = radio.getPayloadSize(); <br />      radio.read(&amp;payload, bytes); <br />      Serial.print(F("Received "));<br />      Serial.print(bytes); <br />      Serial.print(F(" bytes on pipe "));<br />      Serial.print(pipe); <br />      Serial.print(F(": "));<br />      Serial.println(payload);</p>
<p>      role = !role;<br />    }<br />  } // role</p>
<p>} // loop</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Leonardo1123</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15566</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15564</link>
                        <pubDate>Fri, 29 Jan 2021 03:23:41 +0000</pubDate>
                        <description><![CDATA[@leonardo1123 The Gettingstarted.ino does what I think you want to do. The two boards (say remote and local) are communicating with each other.
local is set to TX, remote is set to RX. So l...]]></description>
                        <content:encoded><![CDATA[<p>@leonardo1123 The Gettingstarted.ino does what I think you want to do. The two boards (say remote and local) are communicating with each other.</p>
<p>local is set to TX, remote is set to RX. So local sends something and if no error occurred local changes to RX.</p>
<p>When the remote RX recieves it changes to TX. So they go back and forth without them being in the same state i.e. both RX or TX </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>noweare</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15564</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15560</link>
                        <pubDate>Fri, 29 Jan 2021 02:42:31 +0000</pubDate>
                        <description><![CDATA[@noweare Thanks, I&#039;ll definitely do that! So am I on the right track with having them mainly listening, except putting themselves into send mode and sending data when the data changes? The o...]]></description>
                        <content:encoded><![CDATA[<p>@noweare Thanks, I'll definitely do that! So am I on the right track with having them mainly listening, except putting themselves into send mode and sending data when the data changes? The only problem I can see is if they're both trying to send to each other, that won't work, and they won't know why... But I will come back with an update after the mini-project with either my solution or more clear questions!</p>
<p>Thanks again for all the help.</p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Leonardo1123</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15560</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15555</link>
                        <pubDate>Thu, 28 Jan 2021 23:48:36 +0000</pubDate>
                        <description><![CDATA[There is a lot going on in that sketch. One thing that may help when designing a system is just do one thing first and get that one thing working then go on to the next thing. If you are try...]]></description>
                        <content:encoded><![CDATA[<p>There is a lot going on in that sketch. One thing that may help when designing a system is just do one thing first and get that one thing working then go on to the next thing. If you are trying get communication working strip out all other code that doesn't relate to the communication part.</p>
<p>I said strip-out but you can just start another project and copy the code from your current file to your new file. Then you'll end up with projects that do one thing and they can be used for future projects.</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>noweare</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15555</guid>
                    </item>
				                    <item>
                        <title>RE: Basic RadioHead Sketches *barely* working on Two Unos</title>
                        <link>https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15553</link>
                        <pubDate>Thu, 28 Jan 2021 22:49:12 +0000</pubDate>
                        <description><![CDATA[@frogandtoad So I actually wasn&#039;t able to find what I was looking for, definitely more my inability to find it than it not being there, I&#039;m sure.
So I did what @noweare suggested and went a...]]></description>
                        <content:encoded><![CDATA[<p>@frogandtoad So I actually wasn't able to find what I was looking for, definitely more my inability to find it than it not being there, I'm sure.</p>
<p>So I did what @noweare suggested and went at it on my own, and I think I'm headed in the right direction, but I could use a little help.</p>
<p>Basically, I'm setting both devices to always listen except when data has changed on their end, in that case, they should send it. Since one device is a joystick I'm not touching, and the other is a static number in place of an actual sensor, they should each try to send their thing once and then go back to listening, but I'm just not getting the results I was hoping for. </p>
<p>I know it's a lot of text, so I really appreciate any and all help, this is about 3 new terrains I'm trying to navigate haha...</p>
<p>Here's the code for my car which has motors and will have a ping sensor:</p>
<p> </p>
<pre><br />#include &lt;SPI.h&gt;<br />#include "printf.h"<br />#include "RF24.h"<br /><br />// Motor A<br />#define enA 6<br />#define in1 7<br />#define in2 5<br /><br />// Motor B<br />#define enB 3<br />#define in3 2<br />#define in4 4<br /><br />#define SPEED_MIN 120<br />#define DEADZONE 6<br /><br />int j_X = 0;<br />int j_Y = 0;<br /><br />RF24 radio(8, 10);<br />uint8_t address[] = {"1Node", "2Node"};<br />bool radioNumber = 1;<br /><br />uint8_t joystick;<br /><br />uint8_t pipe;<br /><br />bool oldForward = true;<br />bool forward = true;<br /><br />int left_throttle = 0;<br />int right_throttle = 0;<br /><br />int trueLeftSpeed = 0;<br />int trueRightSpeed = 0;<br /><br />bool received = false;<br /><br />void setForward() {<br />  forward = true;<br /><br />  digitalWrite(in1, HIGH);<br />  digitalWrite(in2, LOW);<br /><br />  digitalWrite(in3, HIGH);<br />  digitalWrite(in4, LOW);<br />}<br /><br />void setBackward() {<br />  forward = false;<br /><br />  digitalWrite(in1, LOW);<br />  digitalWrite(in2, HIGH);<br /><br />  digitalWrite(in3, LOW);<br />  digitalWrite(in4, HIGH);<br />}<br /><br />void setThrottle() {<br />  j_X = 2*joystick - 255;<br />  j_Y = 2*joystick - 255;<br /><br />  if ((abs(j_X) &gt; DEADZONE or abs(j_Y) &gt; DEADZONE) and received) {<br />    if (forward != oldForward) {<br />      left_throttle = 0;<br />      right_throttle = 0;<br />      if (trueLeftSpeed == 0 and trueRightSpeed == 0) { oldForward = forward; }<br />    } else {<br />      if (j_Y &gt; 0) {<br />        if (forward == oldForward) { setForward(); }<br />        left_throttle = map(j_Y, 0, 255, SPEED_MIN, 255);<br />      } else {<br />        if (forward == oldForward) { setBackward(); }<br />        left_throttle = map(-j_Y, 0, 255, SPEED_MIN, 255);<br />      }<br /><br />      right_throttle = left_throttle;<br /><br />      if (-j_X &gt; 3*DEADZONE) {<br />        right_throttle = map(-j_X, 3*DEADZONE, 255, left_throttle, SPEED_MIN);<br />      } else {<br />        left_throttle = map(j_X, 3*DEADZONE, 255, right_throttle, SPEED_MIN);<br />      }<br /><br />      if (right_throttle &gt; 255) { right_throttle = 255; }<br />      if (left_throttle &gt; 255) { left_throttle = 255; }<br />    }<br /><br />  } else {<br />    forward = true;<br />    left_throttle = 0;<br />    right_throttle = 0;<br />  } <br />}<br /><br />void setTrueSpeed() {<br />  if (trueRightSpeed &lt; right_throttle and trueRightSpeed &lt; SPEED_MIN) {trueRightSpeed = SPEED_MIN; }<br />  if (trueRightSpeed &gt; right_throttle and trueRightSpeed &lt; SPEED_MIN) {trueRightSpeed = 0; }<br />  if (trueLeftSpeed &lt; left_throttle and trueLeftSpeed &lt; SPEED_MIN) {trueLeftSpeed = SPEED_MIN; }<br />  if (trueLeftSpeed &gt; left_throttle and trueLeftSpeed &lt; SPEED_MIN) {trueLeftSpeed = 0; }<br /><br />  if (trueLeftSpeed &lt; left_throttle) { trueLeftSpeed++; }<br />  if (trueLeftSpeed &gt; left_throttle) { trueLeftSpeed--; }<br />  if (trueRightSpeed &lt; right_throttle) { trueRightSpeed++; }<br />  if (trueRightSpeed &gt; right_throttle) { trueRightSpeed--; }<br />}<br /><br />void debugInfo() {<br />  Serial.print("Left Throttle: ");<br />  Serial.print(left_throttle); <br />  Serial.print(", Right Throttle: ");<br />  Serial.print(right_throttle);<br />  Serial.print(", True Left: ");<br />  Serial.print(trueLeftSpeed);<br />  Serial.print(", True Right: ");<br />  Serial.print(trueRightSpeed); <br />  Serial.print(", Forward?: ");<br />  Serial.print(forward); <br />  Serial.print(", Old Forward?: ");<br />  Serial.println(oldForward); <br />}<br /><br />void setMotors() {<br />  analogWrite(enA, trueLeftSpeed);<br />  analogWrite(enB, trueRightSpeed);<br />}<br /><br />void getJoystick() {<br />  uint8_t bytes = radio.getPayloadSize(); // get the size of the payload<br />  radio.read(&amp;joystick, bytes); // fetch payload from FIFO<br />  received = true;<br />}<br /><br />uint8_t oldSensors;<br />uint8_t sensors;<br /><br />void sendSensors() {<br />  radio.stopListening(); // put radio in TX mode<br /><br />  bool report = radio.write(&amp;sensors, sizeof(sensors)); // transmit &amp; save the report<br /><br />  if (report) {<br />    Serial.print(F("Sensor 1: "));<br />    Serial.print(sensors); // print payload sent<br />    Serial.print(F(", Sensor 2: "));<br />    Serial.println(sensors);<br /><br />    oldSensors = sensors;<br />    oldSensors = sensors;<br />  } else {<br />    Serial.println(F("Transmission failed or timed out")); // payload was not delivered<br />  }<br />  radio.startListening(); // put radio in RX mode<br />}<br /><br /><br />void setup() {<br /><br />  Serial.begin(115200);<br /><br />  radio.begin();<br /><br />  radioNumber = 0;<br /><br />  radio.setPALevel(RF24_PA_LOW); <br />  radio.setPayloadSize(sizeof(joystick)); <br />  radio.openWritingPipe(address); <br />  radio.openReadingPipe(1, address);<br /><br />  radio.stopListening();<br /><br />  setForward();<br /><br />  sensors = 5;<br />  sensors = 8;<br /><br />} // setup<br /><br />void loop() {<br />  radio.startListening(); <br />  if (radio.available(&amp;pipe)) { // is there a payload? get the pipe number that recieved it<br />    getJoystick();<br />    radio.stopListening();<br />    setThrottle();<br />  }<br />  setTrueSpeed();<br />  if (trueLeftSpeed != left_throttle or trueRightSpeed != right_throttle) {<br />    debugInfo();<br />  }<br />  setMotors();<br />  if (oldSensors != sensors or oldSensors != sensors) {<br />    sendSensors();<br />  }<br />} // loop<br /><br /><br /><br /></pre>
<p>And here's my code for the controller, which has a joystick and will have a display:</p>
<p> </p>
<pre>#include &lt;SPI.h&gt;<br />#include "printf.h"<br />#include "RF24.h"<br /><br />#define JOYSTICK_X A0<br />#define JOYSTICK_Y A1<br /><br />RF24 radio(8, 10); // using pin 7 for the CE pin, and pin 8 for the CSN pin<br /><br />uint8_t address[] = {"1Node", "2Node"};<br /><br />bool radioNumber = 1; // 0 uses address to transmit, 1 uses address to transmit<br /><br />bool role = false; // true = TX role, false = RX role<br /><br />uint8_t joystick;<br />uint8_t oldJoystick;<br /><br />uint8_t pipe;<br /><br />void readJoystick() {<br />  joystick = map(analogRead(JOYSTICK_X), 0, 1023, 0, 255);<br />  joystick = map(analogRead(JOYSTICK_Y), 0, 1023, 0, 255);<br />}<br /><br />  void sendJoystick() {<br />  radio.stopListening(); // put radio in TX mode<br /><br />  bool report = radio.write(&amp;joystick, sizeof(joystick)); // transmit &amp; save the report<br /><br />  if (report) {<br />    Serial.print(F("Joystick_X: "));<br />    Serial.print(joystick); // print payload sent<br />    Serial.print(F(", Joystick_Y: "));<br />    Serial.println(joystick);<br /><br />    oldJoystick = joystick;<br />    oldJoystick = joystick;<br />  } else {<br />    Serial.println(F("Transmission failed or timed out")); // payload was not delivered<br />  }<br />  radio.startListening(); // put radio in RX mode<br />}<br /><br />uint8_t sensors;<br /><br />void getSensors() {<br />  uint8_t bytes = radio.getPayloadSize(); // get the size of the payload<br />  radio.read(&amp;sensors, bytes); // fetch payload from FIFO<br />}<br /><br />void setup() {<br /><br />  Serial.begin(115200);<br /><br />  radio.begin();<br /><br />  radio.setPALevel(RF24_PA_LOW);<br />  radio.setPayloadSize(sizeof(joystick));<br />  radio.openWritingPipe(address);<br />  radio.openReadingPipe(1, address); // using pipe 1<br /><br />} // setup<br /><br />void loop() {<br />  readJoystick();<br /><br />  if (oldJoystick != joystick or oldJoystick != joystick) {<br />    sendJoystick();<br />  }<br /><br />  radio.startListening(); <br />  if (radio.available(&amp;pipe)) { // is there a payload? get the pipe number that recieved it<br />    getSensors();<br />    radio.stopListening();<br />  }<br /><br />} // loop</pre>]]></content:encoded>
						                            <category domain="https://forum.dronebotworkshop.com/arduino/">Arduino</category>                        <dc:creator>Leonardo1123</dc:creator>
                        <guid isPermaLink="true">https://forum.dronebotworkshop.com/arduino/basic-radiohead-sketches-barely-working-on-two-unos/paged/2/#post-15553</guid>
                    </item>
							        </channel>
        </rss>
		