Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
63b672c9
Commit
63b672c9
authored
Oct 01, 2014
by
TMRh20
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RPi B+ info to main examples and readme
parent
5ff3088e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
6 deletions
+29
-6
RF24.h
RF24.h
+9
-4
RPi/RF24/examples/gettingstarted.cpp
RPi/RF24/examples/gettingstarted.cpp
+6
-2
RPi/RF24/examples/gettingstarted_call_response.cpp
RPi/RF24/examples/gettingstarted_call_response.cpp
+3
-0
RPi/RF24/examples/pingpair_dyn.cpp
RPi/RF24/examples/pingpair_dyn.cpp
+3
-0
RPi/RF24/examples/transfer.cpp
RPi/RF24/examples/transfer.cpp
+3
-0
RPi/RF24/readme.md
RPi/RF24/readme.md
+5
-0
No files found.
RF24.h
View file @
63b672c9
...
@@ -1077,6 +1077,12 @@ private:
...
@@ -1077,6 +1077,12 @@ private:
* This is an example of how to use the RF24 class to communicate with ATtiny85 and other node. <br>
* This is an example of how to use the RF24 class to communicate with ATtiny85 and other node. <br>
*/
*/
/**
* @example timingSearch3pin.ino
* <b>New: Contributed by https://github.com/tong67</b><br>
* This is an example of how to determine the correct timing for ATtiny when using only 3-pins
*/
/**
/**
* @example pingpair_dyn.ino
* @example pingpair_dyn.ino
*
*
...
@@ -1178,12 +1184,11 @@ private:
...
@@ -1178,12 +1184,11 @@ private:
* - Mega Boards (1280, 2560, etc)
* - Mega Boards (1280, 2560, etc)
* - Arduino Due: Must use one of the hardware SS/CSN pins as extended SPI methods are used.
* - Arduino Due: Must use one of the hardware SS/CSN pins as extended SPI methods are used.
* Initial Due support taken from https://github.com/mcrosson/RF24/tree/due
* Initial Due support taken from https://github.com/mcrosson/RF24/tree/due
* - ATTiny board support added from https://github.com/jscrane/RF24
* - ATTiny board support
initially
added from https://github.com/jscrane/RF24
* Note: ATTiny support is built into the library. Do not include SPI.h. <br>
* Note: ATTiny support is built into the library. Do not include SPI.h. <br>
* ATTiny 85: D0(pin 5): MISO, D1(pin6) MOSI, D2(pin7) SCK, D3(pin2):CSN/SS, D4(pin3): CE <br>
* See the included examples for more info on using ATTiny with RF24 <br>
* ATTiny 84: PA6:MISO, PA5:MOSI, PA4:SCK, PA7:CSN/SS, CE as desired <br>
* See https://github.com/TCWORLD/ATTinyCore/tree/master/PCREL%20Patch%20for%20GCC for ATTiny patch
* See https://github.com/TCWORLD/ATTinyCore/tree/master/PCREL%20Patch%20for%20GCC for ATTiny patch
* - Raspberry Pi Support: See the readme at https://github.com/TMRh20/RF24/tree/master/RPi
* - Raspberry Pi Support: See the readme at https://github.com/TMRh20/RF24/tree/master/RPi
/RF24
*
*
* @section More More Information
* @section More More Information
*
*
...
...
RPi/RF24/examples/gettingstarted.cpp
View file @
63b672c9
...
@@ -38,6 +38,9 @@ using namespace std;
...
@@ -38,6 +38,9 @@ using namespace std;
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
// NEW: Setup for RPi B+
//RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ);
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 8Mhz
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 8Mhz
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
...
@@ -163,8 +166,9 @@ int main(int argc, char** argv){
...
@@ -163,8 +166,9 @@ int main(int argc, char** argv){
// Fetch the payload, and see if this was the last one.
// Fetch the payload, and see if this was the last one.
radio
.
read
(
&
got_time
,
sizeof
(
unsigned
long
)
);
while
(
radio
.
available
()){
radio
.
read
(
&
got_time
,
sizeof
(
unsigned
long
)
);
}
radio
.
stopListening
();
radio
.
stopListening
();
radio
.
write
(
&
got_time
,
sizeof
(
unsigned
long
)
);
radio
.
write
(
&
got_time
,
sizeof
(
unsigned
long
)
);
...
...
RPi/RF24/examples/gettingstarted_call_response.cpp
View file @
63b672c9
...
@@ -33,6 +33,9 @@ using namespace std;
...
@@ -33,6 +33,9 @@ using namespace std;
// Setup for GPIO 15 CE and CE0 CSN with SPI Speed @ 4Mhz
// Setup for GPIO 15 CE and CE0 CSN with SPI Speed @ 4Mhz
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
// NEW: Setup for RPi B+
//RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ);
// Setup for GPIO 15 CE and CE0 CSN with SPI Speed @ 8Mhz
// Setup for GPIO 15 CE and CE0 CSN with SPI Speed @ 8Mhz
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
...
...
RPi/RF24/examples/pingpair_dyn.cpp
View file @
63b672c9
...
@@ -28,6 +28,9 @@ using namespace std;
...
@@ -28,6 +28,9 @@ using namespace std;
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
// NEW: Setup for RPi B+
//RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ);
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 8Mhz
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 8Mhz
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
...
...
RPi/RF24/examples/transfer.cpp
View file @
63b672c9
...
@@ -32,6 +32,9 @@ using namespace std;
...
@@ -32,6 +32,9 @@ using namespace std;
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 4Mhz
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
//RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0, BCM2835_SPI_SPEED_4MHZ);
// NEW: Setup for RPi B+
//RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ);
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 8Mhz
// Setup for GPIO 22 CE and CE0 CSN with SPI Speed @ 8Mhz
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
RF24
radio
(
RPI_V2_GPIO_P1_15
,
RPI_V2_GPIO_P1_24
,
BCM2835_SPI_SPEED_8MHZ
);
...
...
RPi/RF24/readme.md
View file @
63b672c9
...
@@ -81,6 +81,11 @@ Choose any RPi output pin for radio CE pin.
...
@@ -81,6 +81,11 @@ Choose any RPi output pin for radio CE pin.
RF24 radio(RPI_V2_GPIO_P1_15,BCM2835_SPI_CS0, BCM2835_SPI_SPEED_8MHZ);
RF24 radio(RPI_V2_GPIO_P1_15,BCM2835_SPI_CS0, BCM2835_SPI_SPEED_8MHZ);
or
or
RF24 radio(RPI_V2_GPIO_P1_15,BCM2835_SPI_CS1, BCM2835_SPI_SPEED_8MHZ);
RF24 radio(RPI_V2_GPIO_P1_15,BCM2835_SPI_CS1, BCM2835_SPI_SPEED_8MHZ);
RPi B+:
RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_24, BCM2835_SPI_SPEED_8MHZ);
or
RF24 radio(RPI_BPLUS_GPIO_J8_15,RPI_BPLUS_GPIO_J8_26, BCM2835_SPI_SPEED_8MHZ);
**Pins:**
**Pins:**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment