mbedRTOS quadcopter quadrotor RATE and ATTITUDE mode (default). Altitude Hold soon to come. pHysiX Coding 2014.
Homepage
Feel free to look at the code and implement your own. Don't forget to add in the correct licences, and relevant citation for the relevant developers if you do end up following parts of my code. Sharing is caring :) PM me for queries/code.
This article will be updated slowly, whenever I get a break from rock climbing, university and work commitments. Feel free to comment or ask me questions as need be.
Refer to Wiki Page for complete documentation!
Trung Tin Ian HUA - pHysiX Coding May 2014.
SAFETY FIRST¶
Quadcopters are inherently dangerous! When a quadcopter is on, it is a live saw!
NEVER UNDER ANY CIRCUMSTANCES DO THE FOLLOWING:
- Fly in a closed or confined space.
- Always allow enough room so that the quadcopter does not get near to people or valuables, and always allow enough room to take evasive action should you lose control.
- Touch the quadcopter when it is armed, even if the propellors are not spinning!!!
- The last thing you need is a trip to the ER/ED at 12am because the props cut off half your pinky (personal experience).
Please be observant when flying. If it looks as if you are losing control, just bring the quadcopter back to Earth. A broken motor/prop/frame/circuit can be replaced. Damaged property or worse yet, personal injury, can be irreversible!
Obey your local laws too regarding RC models. Be sensible so that others too can enjoy this wonderful hobby.
DISCLAIMER¶
My code is tailored to have a general approach in terms of flight motion and control. The safety features however are specific to my build!
A quirk is that even when the mbed enters deadlock or is taken offline, the ESCs will continue to run for a period until it figures out it has lost a signal. Chances are that the ESC may even shoot to 100% power!
You are free to use and test my code, BUT I TAKE NO RESPONSIBILITY in any circumstance for any problems you encounter, including and not limited to damage of any sort and especially injury to any person or animal.
With that aside, happy flying everyone!!! :D
Results/Demonstrations¶
Click on image to go to 1-Build Wiki. Link to youtube video
To do/discussions (respective order of priority)¶
- Switch to body frame instead of current YPR.
- Implement Altitude hold!
- Add support for EEPROM to store tuned gains outside of default
- Remap keyboard input for intuitive Telemetry/control
- Remove Bluetooth arming dependency
- Add in LCD output for offline setting/debugging
- Add in voltage sensing alarm
- Build GUI using Processing for Multiwii-like control
- Finish this article!