Skip to content

Commit

Permalink
Update the pin layout table and consolidate the RPi readme files.
Browse files Browse the repository at this point in the history
 - Changes in the pin layout table to describe how to connect the NRF24L01 pins to different boards
 - Remove duplicate readme information in the RPi readme file and point to the default RPi/RF24/readme.md file.
  • Loading branch information
reixd committed Sep 26, 2014
1 parent 6f70a3c commit 1e8de6e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 123 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,25 @@ Supported Boards:
* ARM (Arduino Due) via extended SPI methods
* ATTiny 24/44/84 25/45/85
* Raspberry Pi
* See the [documentation](http://tmrh20.github.io/) for more info
* See the [documentation](http://tmrh20.github.io/) for more info

## Pin layout

The table below shows how to connect the the pins of the NRF24L01(+) to different boards.
CE and CSN are configurable.

| PIN | NRF24L01 | Arduino UNO | ATtiny25/45/85 [0] | ATtiny44/84 [1] |
|-----|----------|-------------|--------------------|-----------------|
| 1 | GND | GND | pin 4 | pin 14 |
| 2 | VCC | 3.3V | pin 8 | pin 1 |
| 3 | CE | digIO 7 | pin 3 | pin 12 |
| 4 | CSN | digIO 8 | pin 4 | pin 11 |
| 5 | SCK | digIO 13 | pin 5 | pin 9 |
| 6 | MOSI | digIO 11 | pin 7 | pin 7 |
| 7 | MISO | digIO 12 | pin 6 | pin 8 |
| 8 | IRQ | - | - | - |

[0] https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/attiny85-use-hints
[1] http://highlowtech.org/?p=1695


19 changes: 10 additions & 9 deletions RPi/RF24/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,16 @@ Choose any RPi output pin for radio CE pin.

**Pins:**

| NRF24L01 | RPI | P1 Connector |
|----------|------------|--------------|
| VCC | rpi-3v3 | (17) |
| GND | rpi-gnd | (25) |
| CE | rpi-gpio22 | (15) |
| CSN | rpi-gpio8 | (24) |
| SCK | rpi-sckl | (23) |
| MOSI | rpi-mosi | (19) |
| MISO | rpi-miso | (21) |
| PIN | NRF24L01 | RPI | RPi -P1 Connector |
|-----|----------|------------|-------------------|
| 1 | GND | rpi-gnd | (25) |
| 2 | VCC | rpi-3v3 | (17) |
| 3 | CE | rpi-gpio22 | (15) |
| 4 | CSN | rpi-gpio8 | (24) |
| 5 | SCK | rpi-sckl | (23) |
| 6 | MOSI | rpi-mosi | (19) |
| 7 | MISO | rpi-miso | (21) |
| 8 | IRQ | - | - |


See http://www.airspayce.com/mikem/bcm2835/index.html for BCM2835 class documentation.
Expand Down
114 changes: 1 addition & 113 deletions RPi/readme.md
Original file line number Diff line number Diff line change
@@ -1,113 +1 @@
# Optimized Raspberry Pi RF24 and RF24 Network Libraries

General Documentation: http://tmrh20.github.io

Library functions are mostly the same.
See the included examples for RPi specific usage

## Raspberry Pi - PreConfig

### Possible pre-configuration:
If SPI is not already enabled, load it on boot:

sudo raspi-config

A. Update the tool via the menu as required
B. Select Advanced and enable the SPI kernel module
C. Update other software and libraries:

sudo apt-get update
sudo apt-get upgrade


# RPi - RF24 Quick-Start
A. Make a directory to contain the RF24 and possibly RF24Network lib and enter it:

mkdir ~/rf24libs
cd ~/rf24libs

B. Clone the RF24 Repo

git clone https:/tmrh20/RF24.git rtemp

C. Copy the RPi library folder to the current directory, and delete the rest

mv rtemp/RPi/RF24 ./
rm -r rtemp
cd RF24

D. Build the library, and run an example file:

sudo make install
cd examples
make
sudo ./gettingstarted


# RPi - RF24Network Quick-Start

A. Enter the same directory that contains the RF24 library folder

cd ~/rf24libs

B. Clone the RF24Network Repo

git clone https:/tmrh20/RF24Network.git ntemp

C. Copy the RF24Network folder to the current directory, and delete the rest

mv ntemp/RPi/RF24Network ./
rm -r ntemp
cd RF24Network

D. Build the library

sudo make install
cd examples
make
sudo ./helloworld_rx OR sudo ./helloworld_tx


# Connection Info

Using pin 15/GPIO 22 for CE, pin 24/GPIO8 (CE0) for CSN

Can use either RPi CE0 or CE1 pins for radio CSN.
Choose any RPi output pin for radio CE pin.

**Constructor:**

RF24 radio(RPI_V2_GPIO_P1_15,BCM2835_SPI_CS0, BCM2835_SPI_SPEED_8MHZ);
or
RF24 radio(RPI_V2_GPIO_P1_15,BCM2835_SPI_CS1, BCM2835_SPI_SPEED_8MHZ);

**Pins:**

| NRF24L01 | RPI | P1 Connector |
|----------|------------|--------------|
| VCC | rpi-3v3 | (17) |
| GND | rpi-gnd | (25) |
| CE | rpi-gpio22 | (15) |
| CSN | rpi-gpio8 | (24) |
| SCK | rpi-sckl | (23) |
| MOSI | rpi-mosi | (19) |
| MISO | rpi-miso | (21) |


See http://www.airspayce.com/mikem/bcm2835/index.html for BCM2835 class documentation.
Note: The BCM library has been customized slightly to allow use of hardware CE pins not
in use for SPI, and to include a millis() function.

****************

Based on the arduino lib from J. Coliz <[email protected]>.
the library was berryfied by Purinda Gunasekara <[email protected]>.
then forked from github stanleyseow/RF24 to https:/jscrane/RF24-rpi
Network lib also based on https:/farconada/RF24Network

Currently optimized and aligned with Arduino fork of libraries by TMRh20:
https:/tmrh20/RF24/RPi and https:/tmrh20/RF24Network/RPi
Documentation: http://tmrh20.github.io


See RPi/RF24/readme.md

0 comments on commit 1e8de6e

Please sign in to comment.