 #include <rf12_itplus.h>
 
 // Enabling LMREMOTE_SERIAL also disables several power saving features
-//#define LMREMOTE_SERIAL 38400
+#define LMREMOTE_SERIAL 38400
+#define RECEIVE_TEST 1
 
 // Base Idenfier for the RFM12B (0-63)
 // The transmitted ID is this ID plus the pin number

#define PIN_DISABLED(pin) ((_enabledProbePins & (1 << pin)) == 0)

// Bits used in output packet
// byte1
#define BYTE1_DUAL_PROBE   0x10
#define BYTE1_RECENT_BOOT  0x20

ISR(WDT_vect) { wdt_disable(); }
ISR(ADC_vect) { _adcBusy = 0; }

static void packetReceived(unsigned char nodeId, unsigned int val)
{
#ifdef LMREMOTE_SERIAL
  Serial.print(F("IN("));
  Serial.print(nodeId);
  Serial.print(F(")="));
  Serial.print(val);
  Serial.print('\n');
#endif

  if (nodeId != NODEID_MASTER)
    return;
  // val contains requested fan speed percent
}

static void rf12_doWork(void)
{
  if (rf12_recvDone() && rf12_crc == 0)
  {
    if (_pinLedRx != 0xff) digitalWrite(_pinLedRx, HIGH);

    unsigned char nodeId = ((rf12_buf[0] & 0x0f) << 2) | (rf12_buf[1] >> 6);
    unsigned int val = (rf12_buf[1] & 0x0f) << 8 | rf12_buf[2];
    packetReceived(nodeId, val);
  }
  if (_pinLedRx != 0xff) digitalWrite(_pinLedRx, LOW);
}

static unsigned int analogReadSleep(unsigned char pin)
{
  _adcBusy = 1;
