Commit 94c84570 authored by Rei's avatar Rei Committed by TMRh20

Select a standard pin layout for the examples.

Choose a standard pin layout for all the examples based on the pin connection table in the readme files.
Different pin layout in the example files could lead to not working examples.
parent bf9d6433
......@@ -50,7 +50,7 @@ const uint64_t pipes[6] =
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
// Setup for GPIO 22 CE and CE1 CSN with SPI Speed @ 8Mhz
RF24 radio(RPI_V2_GPIO_P1_15, RPI_V2_GPIO_P1_26, BCM2835_SPI_SPEED_8MHZ);
RF24 radio(RPI_V2_GPIO_P1_15, RPI_V2_GPIO_P1_24, BCM2835_SPI_SPEED_8MHZ);
int main(int argc, char** argv)
......
......@@ -42,7 +42,7 @@ using namespace std;
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
// Setup for GPIO 22 CE and CE1 CSN with SPI Speed @ 8Mhz
RF24 radio(RPI_V2_GPIO_P1_15, RPI_V2_GPIO_P1_26, BCM2835_SPI_SPEED_8MHZ);
RF24 radio(RPI_V2_GPIO_P1_15, RPI_V2_GPIO_P1_24, BCM2835_SPI_SPEED_8MHZ);
//
......
......@@ -24,7 +24,7 @@
#include "RF24.h"
#include "printf.h"
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 9 & 10
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(7,8);
byte addresses[][6] = {"1Node","2Node"};
......@@ -134,4 +134,4 @@ void loop(void){
radio.openReadingPipe(1,addresses[0]);
}
}
}
\ No newline at end of file
}
......@@ -17,7 +17,7 @@
#include "RF24.h"
#include "printf.h"
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 9 & 10
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(7,8);
// Topology
byte addresses[][6] = {"1Node","2Node"}; // Radio pipe addresses for the 2 nodes to communicate.
......
......@@ -26,7 +26,7 @@ TMRh20 2014
/************* USER Configuration *****************************/
RF24 radio(48,49); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(7,8); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8
unsigned long timeoutPeriod = 3000; // Set a user-defined timeout period. With auto-retransmit set to (15,15) retransmission will take up to 60ms and as little as 7.5ms with it set to (1,15).
// With a timeout period of 1000, the radio will retry each payload for up to 1 second before giving up on the transmission and starting over
......
......@@ -19,7 +19,7 @@
#include "RF24.h"
#include "printf.h"
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 9 & 10
// Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(7,8);
// Topology
......
......@@ -21,7 +21,7 @@
// Hardware configuration
//
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
// Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(7,8);
......@@ -229,4 +229,4 @@ void loop(void)
}
}
}
// vim:cin:ai:sts=2 sw=2 ft=cpp
\ No newline at end of file
// vim:cin:ai:sts=2 sw=2 ft=cpp
......@@ -25,7 +25,7 @@
#include <avr/power.h>
// Hardware configuration
RF24 radio(7,8); // Set up nRF24L01 radio on SPI bus plus pins 9 & 10
RF24 radio(7,8); // Set up nRF24L01 radio on SPI bus plus pins 7 & 8
const short role_pin = 5; // sets the role of this unit in hardware. Connect to GND to be the 'pong' receiver
// Leave open to be the 'ping' transmitter
......
......@@ -32,7 +32,7 @@
#include "printf.h"
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
// Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(7,8);
// sets the role of this unit in hardware. Connect to GND to be the 'pong' receiver
......
......@@ -26,9 +26,9 @@
// Hardware configuration
//
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
// Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(9,10);
RF24 radio(7,8);
//
// Channel info
......@@ -123,4 +123,4 @@ void loop(void)
printf("\n\r");
}
// vim:ai:cin:sts=2 sw=2 ft=cpp
\ No newline at end of file
// vim:ai:cin:sts=2 sw=2 ft=cpp
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment