Skip to content

Commit

Permalink
Cleanup, fork documentations to README.md, and use of dynamic
Browse files Browse the repository at this point in the history
timeout in tests.
  • Loading branch information
gcopeland committed Mar 21, 2013
1 parent 2c1317f commit 5558e45
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Arduino driver for nRF24L01 2.4GHz Wireless Transceiver
# Arduino driver for nRF24L01(+) 2.4GHz Wireless Transceiver

Design Goals: This library is designed to be...

Expand All @@ -7,6 +7,13 @@ Design Goals: This library is designed to be...
* Consumed with a public interface that's similiar to other Arduino standard libraries
* Built against the standard SPI library.

* Modifications to the RF24 library in this fork is backward compatible. A single
enhancement which may cause issue, is code which relies on the driver to power down the
radio, as a side effect. The radio is no longer powered down after each transmit. Rather,
the application must take responsibility for power management. Normally this is
achieved by use of powerDown and powerUp. If you wish to maximize power efficiency,
you must call powerDown after transmit (write, startWrite).

Please refer to:

* [Documentation Main Page](http://maniacbug.github.com/RF24)
Expand All @@ -16,5 +23,7 @@ Please refer to:
* [Chip Datasheet](http://www.nordicsemi.com/files/Product/data_sheet/nRF24L01_Product_Specification_v2_0.pdf)

This chip uses the SPI bus, plus two chip control pins. Remember that pin 10 must still remain an output, or
the SPI hardware will go into 'slave' mode.
the SPI hardware will go into 'slave' mode. This is because the 'SS', or slave select, pin on the arduino
controls if the arduino is the slave. For RF24 use, the arduino is the master and the RF24 is the slave.


3 changes: 2 additions & 1 deletion keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
startListening KEYWORD2
stopListening KEYWORD2
write KEYWORD2
startWrite KEYWORD2
available KEYWORD2
read KEYWORD2
openWritingPipe KEYWORD2
openReadingPipe KEYWORD2
openReadingPipe KEYWORD2
9 changes: 4 additions & 5 deletions tests/pingpair_blocking/pingpair_blocking.pde
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bool notified; //*< Have we notified the user we're done? */
const int num_needed = 10; //*< How many success/failures until we're done? */
int receives_remaining = num_needed; //*< How many ack packets until we declare victory? */
int failures_remaining = num_needed; //*< How many more failed sends until we declare failure? */
const int interval = 100; //*< ms to wait between sends */
int interval = 100; //*< ms to wait between sends */

char configuration = '1'; //*< Configuration key, one char sent in by the test framework to tell us how to configure, this is the default */

Expand Down Expand Up @@ -133,7 +133,6 @@ void setup(void)
//

radio.begin();

//
// Open pipes to other nodes for communication
//
Expand Down Expand Up @@ -186,11 +185,11 @@ void loop(void)
// Now, continue listening
radio.startListening();

// Wait here until we get a response, or timeout (250ms)
unsigned long started_waiting_at = millis();
// Wait here until we get a response, or timeout
unsigned long started_waiting_at = micros();
bool timeout = false;
while ( ! radio.available() && ! timeout )
if (millis() - started_waiting_at > 200 )
if (micros() - started_waiting_at > radio.getMaxTimeout() )
timeout = true;

// Describe the results
Expand Down
2 changes: 0 additions & 2 deletions tests/pingpair_blocking/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#ifndef __PRINTF_H__
#define __PRINTF_H__

#include "WProgram.h"

int serial_putc( char c, FILE * )
{
Serial.write( c );
Expand Down

0 comments on commit 5558e45

Please sign in to comment.