Ran, I am able to plug in the steering servo and use the standard servo sweep example without a problem.
Zoomkat, yes, I tried one of the posted codes that does the arming sequence. The interesting thing is they refer to beeping once it is armed. My doesn't beep - ever. Even when using just the standard pistol transmitter.
Peter, power line is untouched from the ESC to the receiver (straight connection I mean). I tapped into ground so that the Arduino is on the same ground as the battery. I clipped the white wire. I got my readings from the white wire coming from the receiver which is how I got my data. I tried then using various sketches to send data to the esc on the white wire through the PWM 9 line on the Duemilanove.
Here is my code that I used to read the receiver info. I'm still learning the Arduino programming code and thought I understood it until I got this code. I hardly understand any of it but I'll attach it in case it helps.
Thanks for you suggestions everyone. I really appreciate it!
volatile unsigned int Ticks; // holds the pulse count as .5 us ticks
int icpPin = 8; // this interrupt handler must use pin 8
ISR(TIMER1_CAPT_vect){
if( bit_is_set(TCCR1B ,ICES1)){ // was rising edge detected ?
TCNT1 = 0; // reset the counter
}
else { // falling edge was detected
Ticks = ICR1;
}
TCCR1B ^= _BV(ICES1); // toggle bit value to trigger on the other edge
}
void setup() // run once, when the sketch starts
{
Serial.begin(9600);
pinMode(icpPin,INPUT);
TCCR1A = 0x00; // COM1A1=0, COM1A0=0 => Disconnect Pin OC1 from Timer/Counter 1 -- PWM11=0,PWM10=0 => PWM Operation disabled
TCCR1B = 0x02; // 16MHz clock with prescaler means TCNT1 increments every .5 uS (cs11 bit set
Ticks = 0; // default value indicating no pulse detected
TIMSK1 = _BV(ICIE1); // enable input capture interrupt for timer 1
}
int getTick() {
int akaTick; // holds a copy of the tick count so we can return it after re-enabling interrupts
cli(); //disable interrupts
akaTick = Ticks;
sei(); // enable interrupts
return akaTick;
}
void loop() // run over and over again
{
static int prevTick = 0;
if( getTick() != prevTick)
{
prevTick = getTick();
if (prevTick > 3040 && prevTick < 3055) // .760 milliseconds?
{
//Serial.println("Transmitter is on standby");
}
if (prevTick > 3055 && prevTick < 3460) //Accelerating > 0.764 milliseconds and <.860 milliseconds
Serial.println("Forward"); //prevTick); // print the tick value only when it changes
if (prevTick > 2460 && prevTick < 3040) //Reverse > 0.615 milliseconds and < .076 ms
Serial.println("Reverse"); //prevTick);
if (prevTick > 3460) //You are in trouble!!!
Serial.println("Lost Commnunication with transmitter");
}
}