This section is about flashing the flight controller board using the MultiWii software, this is completely open source and is getting updated constantly, so it is important to look out for new versions of the software periodically. MultiWii is used to configure the “behavior” of the copter using the specific sensors of our board, most of the options stay on default, but some others have to be changed.
First we need to download all the software files to our computer before begin installing anything. At first we download the Arduino program, it is essentially a tool that allows us to edit and flash the MultiWii software, the version of the Arduino we use is the latest one, Arduino 1.0.4, which is on this page
http://arduino.cc/en/Main/Software , after decompress the file we run the arduino, for this is necessary have installed “openjdk-7-jre”, then the arduino can run.

After the Arduino we need to download the MultiWii software that will be flashing the controller board. In this case we want to work with the “bleeding edge” to get the latest functions added and you can follow the instruction here
https://code.google.com/p/multiwii/source/checkout but a part of that code have some errors, so you can fixed or search a previous version, they does not have so many differences.
Now we run the Arduino and on it open the MultiWii software to flash it. Once open the Arduino, click on File > Open and a file browser pop up. Search for MultiWii > MultiWii > MultiWii.ino. Once we get to the “.ino” file, click open and Arduino load the program. After that we have this screen:

What we want first is to modificate the config.h, so we select it from the top of the panel and it shows all the configurable parameters to make MultiWii compatible with the hardware on your controller board. Here we are going to show the most relevant parameters for us, because the configuration is really large and it change for all different board.
The first step is select what type of multirotor we have, just uncomment the line deleting the two “/” behind whatever you want to select and the color of the text will turn to to black. To deselect something you simply type two “/” behind whatever you want to deselect and its color will turn back to gray. In our case we select the “Y6” configuration. Type of multicopter > #define Y6
Then we set MINTHROTTLE= 1150, MAXTHROTTLE = 2000, MINCOMMAND = 1000 and I2C_SPEED = 100000L, just make sure it is ok.
Next step is to select the flight controller board, MultiWii give us some options by default, on the “bleeding edge” the MWC 328p or “Holybro”which is the one we are using is not on the default options, so we leave this step and have to select the independent sensors individually. But on the previous version the Holybro is present so you can select it and the sensors are already selected.
This are the sensors we choose. I2C gyroscope: #define ITG3200, I2C acelerometer: #define BMA180, I2C barometer: #define BMP085, I2C magnetometer: #define HMC5883.
Those are the main changes that we do to the config.h, we review all the other options and just make sure they are correct, there are so many other configurations for a better flight but we just use this for make it basic. So then we save the changes.
So now the MultiWii is ready to be uploaded on the board, before to connect the board we need to add our user on the dialout group and configure the serial port /dev/ttyUSB0. To configure the serial port we use minicom, after install it, we execute it o the terminal “minicom -s”.

Edit the serial port setup.
And save the configuration as default.

Press exit, no exit from Minicom, then the serial port is ready. Now we can connect our board to the computer and it is going to be recognized by the Minicom. Once this happen we go to the Arduino and the MultiWii.ino again and compile it (checking for any error), then we do the upload, this will take a few seconds and finally it is flashed.
After the flashing, a file named MultiWiiConf is used to test the behavior of the sensors but we are not there yet, but it looks like this.
