Set-up: A Little info on the how and why. Ye Olde school gave us an assignment to make a Drone. Since the drone had to hoover, a quadcopter seemed like the obvious choice. We did consider other designs but the burning desire to build a quadcopter was too strong.
My school arranged this project so that two different educations have to work together to produce the final product. My education has to provide the electrical engineering and the other education the mecanical engineering. The school gave us a minimal demand of making the drone hoover. No more, no less. So our challenge is to measure the angle of the device and correct the error accordingly with the four motors.
Final Product: We ended up using the Mbed board (Mbed.org), an Accelerometer (ADXL345) and a Gyroscope (ITG3200). To utilize the data form both sensors we had to use a filter(Kalman, IMU). With the available time in the back of our heads we knew we couldn't write one from scratch. Luckily the community around the Mbed board provided one. Sadly though, the compensation for the zero drift introduced by the gyroscope is not working correctly.
The algorithm, we did write ourselves. Nothing special quite unintelligent but it does work. We had planned to use an algorithm wich would take in effect the step response from the previous correction but the problems with the gyroscope set us back to much timewise.
Communications were done using the mbed board as TCP socket host. Using a computer we can connect through a terminal and receive the data we choose to send from the mbed. We also planned an improvement for this: using a computer as TCP host and make the mbed connect automatically as client.