     //Receiver Setup
     pinMode(receiverA_led,OUTPUT);
     digitalWrite(buzzer, HIGH);
-#ifdef USE_DIVERSITY
     pinMode(receiverB_led,OUTPUT);
     digitalWrite(receiverA_led, LOW);
-#endif
-    // dip switches
-#ifdef USE_DIP
-    pinMode(dip_ch0, INPUT);
-    digitalWrite(dip_ch0, INPUT_PULLUP);
-    pinMode(dip_ch1, INPUT);
-    digitalWrite(dip_ch1, INPUT_PULLUP);
-    pinMode(dip_ch2, INPUT);
-    digitalWrite(dip_ch2, INPUT_PULLUP);
-    pinMode(dip_band0, INPUT);
-    digitalWrite(dip_band0, INPUT_PULLUP);
-    pinMode(dip_band1, INPUT);
-    digitalWrite(dip_band1, INPUT_PULLUP);
-    pinMode(dip_enable, INPUT);
-    digitalWrite(dip_enable, INPUT_PULLUP);
-#endif
 #ifdef DEBUG
     Serial.begin(115200);
     Serial.println(F("START:"));

    }
}

#ifdef USE_DIVERSITY
uint16_t readRSSI()
{
    return readRSSI(-1);
}
uint16_t readRSSI(uint8_t receiver)
{
#else
uint16_t readRSSI()
{
#endif
    uint16_t rssi = 0;
    uint16_t rssiA = 0;
#ifdef USE_DIVERSITY
    uint16_t rssiB = 0;
#endif
    for (uint8_t i = 0; i < 10; i++)
    {
        rssiA += analogRead(rssiPinA);
#ifdef USE_DIVERSITY
        rssiB += analogRead(rssiPinB);
#endif
    }
    rssiA = rssiA/10;
#ifdef USE_DIVERSITY
    rssiB = rssiB/10;
    // choosing which receiver RSSI to use.. do not change LED
    if(receiver == useReceiverA)
    {

                    // save 16 bit
                    EEPROM.write(EEPROM_ADR_RSSI_MAX_A_L,(rssi_max_a & 0xff));
                    EEPROM.write(EEPROM_ADR_RSSI_MAX_A_H,(rssi_max_a >> 8));
                    rssi_min_b=rssi_setup_min_b;
                    rssi_max_b=rssi_setup_max_b;
                    // save 16 bit
