 /*
- * Example sketch of how the begin() function can be used to check
- * whether the RFM12B is fitted, and to fall back to using a XRF/XBee
- * radio if it is not. By using a reference to a Stream object this
- * concept can be used to easily create a single firmware image which
- * supports both types of hardware.
+ * Example sketch to demonstrate the concept of how a single firmware
+ * image can support the RFM12B and Ciseco XRF (or XBee) modules,
+ * autoselecting between them depending on the hardware fitted. This
+ * example assumes that the XRF is connected to Serial1, leaving
+ * Serial free for debugging information.
  *
- * Copyright S R Marple, 2013.
- * Released under MIT License, http://opensource.org/licenses/mit-license.php
  */
 
 

 * not exist (eg ATtiny). Use RF12_Stream::begin() in setup() to point
 * the reference to Serial if the RFM12B is not found.
 */
Stream &radio = rfm12b;

AsyncDelay txTimer;


#endif
  Serial.begin(9600);
  if (rfm12b.begin(rfm12bCs, rfm12bIrqPin, rfm12bIrqNum, 1, RF12_433MHZ)) {
    radioPtr = &rfm12b;
    Serial.println("Found RFM12B");
  }
  else {
    Serial.println("RFM12B not found");
    Serial1.begin(9600);
    radioPtr = &Serial1;
  }
}

