Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Development'
Browse files Browse the repository at this point in the history
Conflicts:
	Doxyfile
	README.md
	RF24Network.cpp
	RF24Network_config.h
	RPi/RF24Network/README.md
	RPi/readme.md

Merge Dev into Master
  • Loading branch information
TMRh20 committed Aug 29, 2015
2 parents 546e238 + e60d6ea commit ceecf38
Show file tree
Hide file tree
Showing 22 changed files with 2,330 additions and 5,960 deletions.
331 changes: 197 additions & 134 deletions Doxyfile

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion RPi/RF24Network/Makefile → Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,17 @@ LIBNAME_RFN=$(LIB_RFN).so.1.0

HEADER_DIR=${PREFIX}/include/RF24Network

# Detect the Raspberry Pi from cpuinfo
#Count the matches for BCM2708 or BCM2709 in cpuinfo
RPI=$(shell cat /proc/cpuinfo | grep Hardware | grep -c BCM2708)
ifneq "${RPI}" "1"
RPI=$(shell cat /proc/cpuinfo | grep Hardware | grep -c BCM2709)
endif

ifeq "$(RPI)" "1"
# The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -std=c++0x
endif

# make all
# reinstall the library after each recompilation
Expand Down
124 changes: 106 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,109 @@

Please see the full documentation at http://tmrh20.github.io/RF24Network/

## 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 2 | pin 12 |
| 4 | CSN | digIO 8 | pin 3 | pin 11 |
| 5 | SCK | digIO 13 | pin 7 | pin 9 |
| 6 | MOSI | digIO 11 | pin 6 | pin 7 |
| 7 | MISO | digIO 12 | pin 5 | pin 8 |
| 8 | IRQ | - | - | - |

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

## 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://github.com/tmrh20/RF24.git RF24

C. Change to the new RF24 directory

cd RF24

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

sudo make install
cd examples_RPi
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://github.com/tmrh20/RF24Network.git RF24Network

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

cd RF24Network

D. Build the library

sudo make install
cd examples_RPi
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);

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:**

| 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.
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 <maniacbug@ymail.com>.
the library was berryfied by Purinda Gunasekara <purinda@gmail.com>.
then forked from github stanleyseow/RF24 to https://github.com/jscrane/RF24-rpi
Network lib also based on https://github.com/farconada/RF24Network

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

0 comments on commit ceecf38

Please sign in to comment.