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
01cac5c3
Commit
01cac5c3
authored
May 06, 2014
by
TMRh20
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update readme
parent
ee7f6035
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
64 deletions
+60
-64
RPi/readme.md
RPi/readme.md
+60
-64
No files found.
RPi/readme.md
View file @
01cac5c3
# Optimized Raspberry Pi RF24 and RF24 Network Libraries
Optimized Raspberry Pi RF24 and RF24 Network Libraries
=============================================
General Documentation: http://tmrh20.github.io
General Documentation: http://tmrh20.github.io
Library functions are mostly the same.
Library functions are mostly the same.
See the included examples for RPi specific usage
See the included examples for RPi specific usage
##Raspberry Pi - PreConfig
##
Raspberry Pi - PreConfig
### Possible pre-configuration:
####Possible pre-configuration:
If SPI is not already enabled, load it on boot:
If SPI is not already enabled, load it on boot:
```
sudo raspi-config
sudo raspi-config
```
A. Update the tool via the menu as required
A. Update the tool via the menu as required
B. Select Advanced and enable the SPI kernel module
B. Select Advanced and enable the SPI kernel module
C. Update other software and libraries:
C. Update other software and libraries:
```
sudo apt-get update
sudo apt-get update
sudo apt-get upgrade
sudo apt-get upgrade
```
RPi - RF24 Quick-Start
======================
# RPi - RF24 Quick-Start
A. Make a directory to contain the RF24 and possibly RF24Network lib and enter it:
A. Make a directory to contain the RF24 and possibly RF24Network lib and enter it:
```
mkdir ~/rf24libs
mkdir ~/rf24libs
cd ~/rf24libs
cd ~/rf24libs
```
B.
Clone the RF24 Repo
B.
Clone the RF24 Repo
```
git clone https://github.com/tmrh20/RF24.git rtemp
git clone https://github.com/tmrh20/RF24.git rtemp
```
C. Copy the RPi library folder to the current directory, and delete the rest
C. Copy the RPi library folder to the current directory, and delete the rest
```
mv rtemp/RPi/RF24 ./
mv rtemp/RPi/RF24 ./
rm -r rtemp
rm -r rtemp
cd RF24
cd RF24
```
D. Build the library, and run an example file:
D. Build the library, and run an example file:
```
sudo make
sudo make
install
cd examples
cd examples
sudo make
make
sudo ./gettingstarted
sudo ./gettingstarted
```
RPi - RF24Network Quick-Start
#
RPi - RF24Network Quick-Start
=============================
A. Enter the same directory that contains the RF24 library folder
A. Enter the same directory that contains the RF24 library folder
```
cd ~/rf24libs
cd ~/rf24libs
```
B. Clone the RF24Network Repo
B. Clone the RF24Network Repo
```
git clone https://github.com/tmrh20/RF24Network.git ntemp
git clone https://github.com/tmrh20/RF24Network.git ntemp
```
C. Copy the RF24Network folder to the current directory, and delete the rest
C. Copy the RF24Network folder to the current directory, and delete the rest
```
mv ntemp/RPi/RF24Network ./
mv ntemp/RPi/RF24Network ./
rm -r ntemp
rm -r ntemp
cd RF24Network
cd RF24Network
```
D. Build the library
D. Build the library
```
sudo make
cd examples
sudo make
sudo make
cd examples
sudo ./helloworld_rx OR sudo ./helloworld_tx
sudo make
sudo ./helloworld_rx OR sudo ./helloworld_tx
```
# Connection Info
Connection Info
===============
Using pin 15/GPIO 22 for CE, pin 24/GPIO8 (CE0) for CSN
Using pin 15/GPIO 22 for CE, pin 24/GPIO8 (CE0) for CSN
...
@@ -79,23 +77,22 @@ Can use either RPi CE0 or CE1 pins for radio CSN.
...
@@ -79,23 +77,22 @@ Can use either RPi CE0 or CE1 pins for radio CSN.
Choose any RPi output pin for radio CE pin.
Choose any RPi output pin for radio CE pin.
**Constructor:**
**Constructor:**
```
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);
```
**Pins:**
**Pins:**
|NRF24L01 | RPI
| P1 Connector |
| NRF24L01 | RPI
| P1 Connector |
|-----|-----------|
-------------|
|----------|------------|-
-------------|
| VCC | rpi-3v3 | (17)
|
| VCC | rpi-3v3 | (17)
|
| GND | rpi-gnd | (25)
|
| GND | rpi-gnd | (25)
|
| CE | rpi-gpio22 | (15)
|
| CE | rpi-gpio22 | (15)
|
| CSN | rpi-gpio8 | (24)
|
| CSN | rpi-gpio8 | (24)
|
| SCK | rpi-sckl | (23)
|
| SCK | rpi-sckl | (23)
|
| MOSI | rpi-mosi | (19)
|
| MOSI | rpi-mosi | (19)
|
| MISO | rpi-miso | (21)
|
| MISO | rpi-miso | (21)
|
See http://www.airspayce.com/mikem/bcm2835/index.html for BCM2835 class documentation.
See http://www.airspayce.com/mikem/bcm2835/index.html for BCM2835 class documentation.
...
@@ -104,7 +101,6 @@ in use for SPI, and to include a millis() function.
...
@@ -104,7 +101,6 @@ in use for SPI, and to include a millis() function.
****************
****************
Based on the arduino lib from J. Coliz
<maniacbug@ymail.com>
.
Based on the arduino lib from J. Coliz
<maniacbug@ymail.com>
.
the library was berryfied by Purinda Gunasekara
<purinda@gmail.com>
.
the library was berryfied by Purinda Gunasekara
<purinda@gmail.com>
.
then forked from github stanleyseow/RF24 to https://github.com/jscrane/RF24-rpi
then forked from github stanleyseow/RF24 to https://github.com/jscrane/RF24-rpi
...
...
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