Just looking around the site I haven't noticed an example of a hack I did today - I took the receiver out of a really cheap ($20) remote control airplane and added it to my arduino-brained bot. I could post a wiring diagram and sample code if a)anyone is interested and b) I haven't just overlooked the page on the site (or posts on the forums) where someone else did just this!
It has come up before (there is a recent thread here : http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1199165055) but it would be interesting to read about your approach. So please do post your diagrams and code.
What I did is much less complex. I removed the styrofoam and glue of the airplane to expose a PCB with 5 terminals: V+, V-, M-, M1+, and M1-.
The PBC labels are a little confusing, but since I removed the glue-encrusted wires I knew where they belonged; the V+ and V- went to the battery (a 4.5V LiPo), the V+(again) and M- went to the motor (no speed control, just on or off), and the M1+ and M1- went to a little coil on the tail of the plane that kicked a tiny magnet on the rudder to the left or right.
First I wired it to power - I wanted to use the 5V regulator on my robot's motor control board so I ran V+ and V- to the +5V and GND terminals of the controller. This ground terminal is also common to Arduino ground.
Next I wired it to the Arduino - M-, M1+, and M1- each went to my first non-serial I/O, non-PWM pins; 2, 4, and 8.
Here is example code. I can post basic 'bot code too, but not until tomorrow (it's still embarassingly poor).
// Remote Control Example
// Eustace 1/11/08
int signalPin1 = 2; //Setting the input pins for the wires from the receiver
int signalPin2 = 4; //Using these pins to avoid serial I/O and PWM pins useful
int signalPin3 = 8; //for other purposes!
void setup()
{
pinMode(signalPin1, INPUT); //Setting the input pins for a signal that is 0 volts
digitalWrite(signalPin1, HIGH); //in reference to the 5 volts shared by the outputs and
pinMode(signalPin1, INPUT); //the power in (normally a LiPo battery) on the receiver
digitalWrite(leftIn, HIGH);
pinMode(signalPin1, INPUT);
digitalWrite(signalPin1, HIGH);
}
void loop()
{
int statePin1 = digitalRead(signalPin1); //check the pins
int statePin2 = digitalRead(signalPin2);
int statePin3 = digitalRead(signalPin3);
if(statePin1 == LOW) //Just reference code, insert your own logic here!
{
action1();
}
else if(statePin2 == LOW)
{
action2();
}
else if(statePin3 == LOW)
{
action3();
}
else
{
action4();
}
}
void action1()
{
//more reference code for those unfamiliar with writing their
//own functions - here you can put code that executes when called
//from the main loop()
}
void action2()
{
}
void action3()
{
}
void action4()
{
}