 {
     Serial.begin(9600); 
     
+    pinMode(LED_DEBUG, OUTPUT);     
+    pinMode(PIN_TX, OUTPUT); 
+   
+    vw_set_ptt_inverted(true); // Required for DR3100
+    vw_setup(2000);      // Bits per sec
+    vw_set_tx_pin(PIN_TX);
+      
+    watchdog_setup();
+  
     servo_virt.attach(SERVO_PIN_VIRT);
     servo_horz.attach(SERVO_PIN_HORZ);
     

// The move delay.
const long move_interval = 100; 

ServoTimer2 servo_virt;
ServoTimer2 servo_horz;


    unsigned long now = millis();
    if (now - move_last >= move_interval) {
        move_last = now;
        
        // Move the panels if needed.
        tkr_move();
    }
    
    if (now - tx_last >= tx_interval) {
        tx_last = now;
        
        // if the LED is off turn it on and vice-versa:
        if (ledState == LOW) {
          ledState = HIGH;
        } else {
          ledState = LOW;
        }
        digitalWrite(LED_DEBUG, ledState);
        
        // Send a transmission
        char msg[16];
        sprintf(msg, "%d,wd=1,mv=%u", msgId, readVcc());
        vw_send((uint8_t *)msg, strlen(msg));
        //vw_wait_tx(); // Wait until the whole message is gone
        
        // Reset watchdog so he knows all is well.
        wdt_reset();
    }
}

