This is hooked to a regular transmitter's potentiometer's to allow control from a Raspberry Pi.

A regular, cheap transmitter used for real-time flying of hobby quadcopters, planes, and helicopters works well for just that: real-time flying. But these are inaccurate, controlled by the dexterity of your thumbs. And they're real-time, and there's no way to have a programmed flight.

This circuit 'hacks' one of these transmitters. Inside each transmitter are four potentiometers, each dedicated to each channel: roll, pitch, yaw, and throttle. This circuit is simply a way to replace those mechanical potentiometers with digital ones. MCP4161-502E/P digital potentiometers, to be exact, which will replace the ones in most transmitters perfectly. 

These will be used as voltage dividers, not variable resistors or rheostats. And they communicate with the Raspberry Pi through an SPI connection, which in this case is paralleled on its Serial Clock (SCK) pin, and Master-Out-Slave-In (MOSI) pin. Each digital potentiometer needs to have its own Slave Select pin, and the Raspberry Pi Model B Revision Two only has two. However, regular GPIO pins can be used as SS pins, and will turn on when their output is set to LOW.

Working code will come in the second revision of this project. I'm still prototyping now. But final goal will be to allow yourself to make files of coordinates, and the quadcopter will fly to those. Each coordinate will be a set of distances. I'm not sure what the base distance will be. And of course, that distance will only work for my quadcopter. But you can edit the code.

Another thing to note: I have wired up the potentiometer outputs to screw terminals (with lots of excessive wiring to simplify things). Depending on your transmitter, this may change. These digital potentiometers work exactly as analog do - and they can be wired the same way, too. Pins 5, 6, and 7 are the potentiometer output pins, just follow the wiring to the screw terminal. Pin 5 is tap A, pin 6 is the wiper, and pin 7 is tap B. Easy.