Thank you both. In reply to BulldogLowell, here is the code for the receiver that is wired to the Wiznet shield with the radio using pins A0, A1, A2, 5, and 6.
I copied and modified the receiver code from http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
/* MODIFIED FOR RECEIVING DHT22 TEMPERATURE AND HUMIDITY DATA RATHER THAN
JOYSTICK VALUES AS STATED BELOW
YourDuinoStarter Example: nRF24L01 Receive Joystick values
- WHAT IT DOES: Receives data from another transceiver with
2 Analog values from a Joystick or 2 Potentiometers
Displays received values on Serial Monitor
- SEE the comments after "//" on each line below
- CONNECTIONS: nRF24L01 Modules See:
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
1 - GND
2 - VCC 3.3V !!! NOT 5V
3 - CE to Arduino pin 9--switched to pin 5
4 - CSN to Arduino pin 10--switched to pin 6
5 - SCK to Arduino pin 13--switched to pin A0
6 - MOSI to Arduino pin 11--switched to pin A1
7 - MISO to Arduino pin 12--switched to pin A2
8 - UNUSED
- V1.00 11/26/13
Based on examples at http://www.bajdi.com/
Questions: terry@yourduino.com */
/*-----( Import needed libraries )-----*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
//#include <MySensor.h>
//#include <DigitalIO.h>
#include <Ethernet.h>
#include "plotly_streaming_ethernet.h"
/*-----( Declare Constants and Pin Numbers )-----*/
#define CE_PIN 5
#define CSN_PIN 6
#define nTraces 2
char *tokens[nTraces] = {"2222222222", "3333333333"};
// arguments: username, api key, streaming token, filename
plotly graph("jameshapper", "1111111111", tokens, "BoyerCabinTempHum", nTraces);
// NOTE: the "LL" at the end of the constant is "LongLong" type
const uint64_t pipe = 0xE8E8F0F0E1LL; // Define the transmit pipe
/*-----( Declare objects )-----*/
RF24 radio(CE_PIN, CSN_PIN); // Create a Radio
/*-----( Declare Variables )-----*/
int dht22array[2]; // 2 element array holding DHT22 readings
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte my_ip[] = { 222, 22, 222, 2 }; // google will tell you: "public ip address"
void startEthernet(){
Serial.println("... Initializing ethernet");
if(Ethernet.begin(mac) == 0){
Serial.println("... Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, my_ip);
}
Serial.println("... Done initializing ethernet");
delay(1000);
}
void setup() /****** SETUP: RUNS ONCE ******/
{
graph.timezone = "America/New_York";
graph.maxpoints = 250;
Serial.begin(9600);
delay(1000);
Serial.println("Nrf24L01 Receiver Starting");
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();;
delay(3000);
startEthernet();
graph.fileopt = "extend"; // Remove this if you want the graph to be overwritten
bool success;
success = graph.init();
if(!success){while(true){}}
graph.openStream();
}//--(end setup )---
void loop() /****** LOOP: RUNS CONSTANTLY ******/
{
if ( radio.available() )
{
// Read the data payload until we've received everything
bool done = false;
while (!done)
{
// Fetch the data payload
done = radio.read( dht22array, sizeof(dht22array) );
Serial.print("temperature = ");
Serial.print(dht22array[0]);
Serial.print(" humidity = ");
Serial.println(dht22array[1]);
Serial.println(millis());
graph.plot(millis(), dht22array[0], tokens[0]);
graph.plot(millis(), dht22array[1], tokens[1]);
delay(15000);
}
}
else
{
Serial.println("No radio available");
}
}//--(end main loop )---
/*-----( Declare User-written Functions )-----*/
//NONE
//*********( THE END )***********
I am still studying the api documentation, as suggested. Thanks again.