           RC_results[i] = INVALID_DATA;
       rc_state = RC_WAIT;
           
-      attachInterrupt(RC_INTERRUPT, ISR_rise, RISING);
-}
-void ISR_rise()
-{
-    noInterrupts();
-
-    if (rc_state != RC_WAIT)
-    {
-      if (!synced)
-      {
-        unsigned int elapsed = micros() - last_fallingedge_time;
-        if (elapsed > LONG_DEADZONE_THRESHOLD)
-        {
-          RC_results[rc_index] = micros();
-          synced = true;
-          rc_index = 1;
-        }
-      }
-      else
-      {
-        RC_results[rc_index] = micros();
-      }
-      attachInterrupt(RC_INTERRUPT, ISR_fall, FALLING);
-    }
-    
-    interrupts();
-}
-void ISR_fall()
-{
-    noInterrupts();
-    
-    if (rc_state != RC_WAIT)
-    {
-      if (!synced)
-      {
-        last_fallingedge_time = micros();
-      }
-      else
-      {
-        RC_results[rc_index] = micros() - RC_results[rc_index];
-        rc_index++;
-        if (rc_index == 7)
-        {
-          rc_index = 1;
-          rc_state = RC_DONE;
-        }
-      }
-      attachInterrupt(RC_INTERRUPT, ISR_rise, RISING);
-    }
-    interrupts();
-}
-void loop()  {
+    attachInterrupt(Signals[0], ISR1_rise, RISING);
+    attachInterrupt(Signals[1], ISR2_rise, RISING);
+    attachInterrupt(Signals[2], ISR3_rise, RISING);
+    attachInterrupt(Signals[3], ISR4_rise, RISING);
+    attachInterrupt(Signals[4], ISR5_rise, RISING);
+    attachInterrupt(Signals[5], ISR6_rise, RISING);
+}
+void loop() {
     unsigned long Start_us = micros();
     
     startCapturingRCState();
     
     unsigned long local_results[7];
-    while (rc_state != RC_DONE)
-        ;
+    while (!(RC_Done[2] == 1&& RC_Done[3] == 1&& RC_Done[4] == 1&& RC_Done[5] == 1&& RC_Done[6] == 1))
+    ;
     // got data;    
     rc_state = RC_WAIT;  // ignore pulses on data line.
     for (int i = 0; i < 8; i++)

void brake(int amount)
{
      analogWrite(BRAKE_OUT_PIN, amount);
}
void moveVehicle(int acc)
{
      /* Observed behavior on ElCano #1 E-bike no load (May 10, 2013, TCF)
      0.831 V at rest 52 counts
      1.20 V: nothing 75
      1.27 V: just starting 79
      1.40 V: slow, steady 87
      1.50 V: brisker 94
      3.63 V: max 227 counts
      255 counts = 4.08 V
      */
      DAC_Write(3, acc);
}
/*---------------------------------------------------------------------------------------*/
/* DAC_Write applies value to address, producing an analog voltage.

    unsigned long Elapsed_us = micros() - Start_us;
    Serial.print(Start_us);      Serial.print("\t");
    Serial.print(Elapsed_us);    Serial.print("\t");
    Serial.print(local_results[0]);  Serial.print("\t");
    Serial.print(local_results[1]); Serial.print("\t");
    Serial.print(local_results[2]); Serial.print("\t");
    Serial.print(local_results[3]); Serial.print("\t");
