I just thought I would share this R/C option I found that works great and is amazingly cheap. I tried jeenodes (currently a little out of my league), a 49mhz transmitter/receiver I took from a $10 r/c car, and an esky 72mhz setup with lackluster results, then I found this 2.4ghz 6 channel setup for $32 SHIPPED. It has a box auto checked to include a receiver, for an extra $9. I left this box checked, and they sent me 2 receivers, so uncheck the box to save $9.
Also, when searching this forum, I found some threads where people had tried an esky 72 mhz setup, and had to use interrupts because pulsein wasn't fast enough. It's plenty fast enough for this 2.4g model.
Here is the code I am using.
// 2.4ghz wireless r/c control to sabretooth 2x25 running in analog
// mode. 0.2v is full reverse, 2.5v-2.7v (127-131) is neutral, 5v is full
// forward.
// values for pin definition
int RC_Chan2 = 2;// RC channel 2 (right side stick)
int RC_Chan3 = 3; // RC channel 3 (left side stick)
int Motor1 = 9; // Motor 1 signal out
int Motor2 = 11; // Motor 2 signal out
int LedPin1 = 12; //Neutral indicator for motor 1
int LedPin2 = 13; //Neutral indicator for motor 2
// pulse duration lengths
unsigned long duration2; // named for channel 2, pulse duration
unsigned long duration3; // named for channel 2, pulse duration
// values for pulse lengths
//Set pulses a little wider than normal so I could use a trick with full reverse
// being 1 instead of 0 with zero defaulting to failsafe since receiver returns 0 with
//transmitter off
int RC2_Low = 1100; // Full reverse pulse for RC2
int RC2_High = 1870; // Full Forward pulse for RC2
int RC3_Low = 1100; //Full reverse pulse for RC3
int RC3_High = 1870; //Full Forward pulse for RC3
// place holders for adjusted values used in loop
int RC2_Adjusted = 0;
int RC3_Adjusted = 0;
void setup () // setup void
{
pinMode(RC_Chan2, INPUT); //set rc channel 2 as input
pinMode(RC_Chan3, INPUT); // set rc channel 3 as input
pinMode(Motor1, OUTPUT); // set motor 1 signal as output
pinMode(Motor2, OUTPUT); // set motor 2 signal as output
pinMode(LedPin1, OUTPUT); // neutral indicator
pinMode(LedPin2, OUTPUT); // neutral indicator
Serial.begin(9600); // begin serial
}
void loop() // loop
{
duration2 = pulseIn(RC_Chan2, HIGH); // read pulse duration of chan 2
duration3 = pulseIn(RC_Chan3, HIGH); // read pulse duration of chan 3
//Accounting for pitch trimmers
duration2 = constrain(duration2, RC2_Low, RC2_High);
duration3 = constrain(duration3, RC3_Low, RC3_High);
RC2_Adjusted = map(duration2, RC2_Low, RC2_High, 0, 255);
RC3_Adjusted = map(duration3, RC3_Low, RC3_High, 0, 255);
//setting a pwm value. technically 2.5v should be 127 but motor driver is liking 130
if ((RC2_Adjusted < 140) && (RC2_Adjusted > 120))
RC2_Adjusted = 130;
if ((RC3_Adjusted < 135) && (RC3_Adjusted > 120))
RC3_Adjusted = 130;
if (RC2_Adjusted == 0){
RC2_Adjusted = 130;
digitalWrite(LedPin1, HIGH);
}
if (RC3_Adjusted == 0){
RC3_Adjusted = 130;
digitalWrite(LedPin2, HIGH);
}
analogWrite(Motor1, RC2_Adjusted);
analogWrite(Motor2, RC3_Adjusted);
//serial monitoring
Serial.print("RC2");
Serial.print(" ");
Serial.print(RC2_Adjusted);
Serial.print(" ");
Serial.print(" ");
Serial.print(" ");
Serial.print(" ");
Serial.print("RC3");
Serial.print(" ");
Serial.print(RC3_Adjusted);
Serial.print(" ");
Serial.print(" ");
Serial.println(" ");
delay(1000);
}
Just wanted to contribute something back after all the help I've received!