Labels

"Igbo Blues" 2006 2008 2010 Acceleration of proceedings Adamosa Osagiede Admissibility of oppositions Africa Musica African Divas African Fiesta Akwé Obiang Amharic Amunataba Dance Band Angèle Revignet Appeals : miscellaneous As I Lay Dying Bella-Bella Benga Bezawork Asfaw Biafra Bikutsi Bob Sir Merenge Bobongo Stars Bring Me The Horizon Bumba Massa Cameroun Canon Star cara mendapatkan uang Central African Republic Centro Mix Chelsea Grin Christy Essien-Igbokwe Claim interpretation Clarity CoC CoC akan Ditutup CoC ditutup Hoax CoC resmi ditutup CoC Tidak jadi ditutup Congo Correction of errors Côte d'Ivoire DDC Mlimani Park Orchestra Deathcore Desolation Of Eden Divisional application Douala Dr. Nico drone Dur Dur Ebenezer Obey Edo Efik Egwu Ekpili Elias Tababbal err errbot Ethiopia Ewi Ezigbo Obiligbo Faadumo Qaasim Fees Framework of appeal Francis Gon Gabon gaming gentoo Ghana golang Hausa Highlife Hilarion Nguema I.K. Dairo Igbo Igbo Traditional Music Info Itsiembu Bi-Mbin Jean-Boniface Asssélé Jerry Hansen Jezu Lokota Jo-Man Anguilet Josky Kiambukuta Juju Julien Nziengui Kenya Kiam Kosmos Moutouari l'ANPAC Presente Lanrewaju Adepoju Lapiro de Mbanga Late filing lego Leonard Dembo Libaaxyada Maaweeliska Banaadir Lingala linux Lipua-Lipua Mack Joss Makossa Mali Marcel Djabioh Marthe Ashagari Mayele Mbalax Mbaye Dieye Faye Melo Divine Metalcore Mike Ejeagha Miriam Makeba Mobanza Ley Musiki Mutuashi Muziki wa Dansi Nigeria Nigerian Female Vocalists Norbert Epandja Novelty Obiang Okane Oral proceedings Orchestra Cavacha Orchestre African Jazz Orchestre Veve Osayomore Joseph Other Blogs Ouaka Stars Partiality Patent Register Patrick Idahosa Personal musings Petit Tchadien Pierre Embony Pierre-Claver Zeng Pop Prior public use python Real Sounds of Africa Reimbursement review Rex Lawson Rigo Star Rock Sahra Dawo Santo Backita Senegal Shona Show Promoter Sierra Leone software development Somalia Soukous South Africa Stay of proceedings Substantial procedural violation Sufficiency of disclosure Suicide Silence Super Stars Swahili Sylvester Odhiambo Talents of Benin Tanzania Technical or not Teshome Asged Tips tmux Togo Toto Guillaume tutorial Verckys Vijana Jazz vim Waaberi Wolof Yoruba Yoruba Percussion Styles Yvon Dawens Z 3.1.01 Z 3.2.04 Z 3.2.07 Z 3.3.02 Z 3.3.03 Z 3.3.10 Z 3.5.01 Zambia Zimbabwe Zokela

DIY drone - tutorial for developers | Part 4 - Dev environment

Development environment

Ha, finally the easy part ;)

Toolchain 

The FC is programmed like an arduino so you'll need the arduino toolchain.

On linux Arch for example it means you need to install :
community/avr-binutils
community/avr-gcc
community/avr-libc
community/avrdude


Source Code

No need to use the java UI with sketches etc ... I have adapted a cmake environment to compile Multiwii. This is the onboard flying software we gonna use.

git clone https://github.com/gbin/multiwii-cmake.git
cd multiwii-cmake

Here you'll find :
cmake : a plugin for cmake to compile arduino stuff
src :  a mirror of multiwii
CMakeLists.txt : the source file for cmake to make a Makefile

The branch master is a vanilla multiwii but the branch gbin-quad has a config tuned for the components of this tutorial.

Edit src/config.h and adapt it with the basic components. Start with something minimal, don't try to make your GPS work on the first flight.


Compile it

One shot operation : generate the Makefile
mkdir build
cd build
cmake ..

Then to compile it :
make

This should generate a file called quad.hex in the build/src/ directory. This is a string version of the firmware you'll need to flash to the FC. Yeah it looks like a weird hexdump but this is the one you need to use.


Flash it

One shot operation: make you a couple of handy shortcuts 
> cat mw_backup
avrdude -v -c wiring -p ATmega2560 -P /dev/ttyUSB0 -b 115200 -U flash:r:flash_backup.hex:i

This will backup whatever you currently have flashed (it is also a good test that your toolchain can talk to the controller without touching anything yet)

> cat mw_flash    
avrdude -v -D -p ATmega2560 -c wiring -P /dev/ttyUSB0 -b 115200 -U flash:w:$1:i

This will flash the .hex file you give as parameter. chmod 755 them and put them in your path somewhere.

Flashing operation:
connect the FC only by the USB port, then from the root
mw_flash build/src/quad.hex

This is physically doing some magic knocking on the serial interface through the USB port to ask the controller to reboot then push the file through it when it is in programming mode just after reboot.

The parts finally arrived ? Let's start assembling it !

0 Response to "DIY drone - tutorial for developers | Part 4 - Dev environment"

Post a Comment