 ISR (SPI_STC_vect)
 {
 
-//servo values updated by Rpi
-  union int_byt{
-    uint8_t b[2];
-    uint16_t un;
-  } *rx_data = new int_byt[SERVO_NUM],
-    *tx_data = new int_byt[SERVO_NUM];
-
-
-  tx_data[0].un = unThrottleInShared;
-  tx_data[1].un = unYawInShared;
-  tx_data[2].un = unPitchInShared;
-  tx_data[3].un = unRollInShared;
-
-  Serial.print("Sent : ");
-  for (int i=0; i<SERVO_NUM; i++){
-    Serial.print(tx_data[i].un);
-    Serial.print(" ");
-    for (int ibyte=0; ibyte<2; ibyte++){
-      // grab byte from SPI Data Register
-      rx_data[i].b[ibyte] = SPI.transfer(tx_data[i].b[ibyte]);
-    }
-    Serial.print(rx_data[i].un);
-    Serial.print(" ");
-
+  if (spireq == 0) {
+    //we have nothing to send, grab a new command
+    byte cmd = SPDR;
+    switch (cmd) {
+    case 'R': //ask for radio input and get ESC output
+      spireq = 1;
+      ibyte=0;
+
+      // update rc_data
+      rc_data.un = unThrottleInShared;
+
+      //prepare for next interrupt
+      SPDR = rc_data.b[ibyte+1];
+    };
+
+    return;
   }
-  Serial.println(" ");
+
+  switch (spireq){
+  case 1:
+    if (spicount <= spimax_R){
+      //echange values byte per byte
+
+      //grab inputs
+      esc_data.b[ibyte] = SPDR;
+
+      //prepare for next call
+      if (ibyte == 0) ibyte++;
+      SPDR = rc_data.b[ibyte-1];
+
+      spicount++;
+
+    } else {
+      //we finished send RC values
+      Serial.print("Finished transaction :");
+      Serial.print(esc_data.un);
+      Serial.print(" ");
+      Serial.println( rc_data.un);
+
+      //prepare for next request
+      SPDR = 0;
+      spireq = 0;
+      ibyte = 0;
+    }
+  }
+
 }
 
 /*----------------------------------

//define Servo variables
Servo MOTOR[SERVO_NUM];

//setup function
void setup()
{

    SPI settings
  */

  //SPI.setDataMode(SPI_MODE0);

  // Declare MISO as output : have to send on
  //master in, *slave out*
