I am controlling a Sabertooth controller using a RC receiver and it works fine. Now I want to intercept the signal from the Rx and make some decisions with a Arduino Pro Mini so I am using the puseIn to get the value from the RC rx, and then based on some rules, either send the pulse to the Sabertooth or not. (haven't got to the rule code yet.
In testing to see if I could pass through the data from the Rx to the sabertooth via the arduino using the puseIn and digitalWrite out, it does not seem to work.
Am I oversimplifying this? Does this even sound possible using some variation of the method below? Any suggestions would be very welcome.
int p2;
void setup()
{
Serial.begin(9600);
pinMode(2,INPUT);
pinMode(9,OUTPUT);
}
void loop()
{
p2=pulseIn(2,HIGH,25000); // GET THE PULSE FROM THE RECEIVER
Serial.println(p2); // JUST TO SEE WHAT IS BEING RETURNED
// here is where my future code will go to determine if the pulse should be sent out or not.
// if the pulse should be passed through.....
digitalWrite(9,HIGH); // START THE PUSLE
delayMicroseconds(p2); // USE THE INCOMING PULSE WIDTH TO DETERMINE THAT OUTGOING PULSE WIDTH
digitalWrite(9,LOW); // END THE PULSE
}
Thank you
Charlie
