From the Firmware Tool to Arduino IDE

For advanced users and MultiWii developers, using this method you will download the firmware source code for your version and use the Arduino development environment to compile and upload to the Quadrino board. This method is more suited to developers of the MultiWii community.

It is easy to create an Arduino IDE project directly from the Firmware Tool. Simply configure all your options and then on the Review step click "Open in Arduino" button near the top. The Firmware Tool will download the source code installing it in the appropriate Arduino sketch folder. Your new Arduino project will already be configured with the options you selected from the Firmware Tool. However, if you make changes to the files within the new project you cannot migrate these changes back to the Firmware Tool.

Customizing options not available in the Firmware Tool

Moving into the Arduino IDE allows you to configure the advanced options not available from the Firmware Tool. However, there is another way that allows you to continue to use the Firmware Tool! You can edit and customize the config.h template that the Firmware Tool uses to build the firmware. To enable this "override" mode involves simply renaming a file on disk.

Rename and edit the config.h template used by the Firmware Tool:

  1. On the Welcome screen of the Firmware Tool, click the "Explore Files on Disk..." link below the profile name.
  2. Enter the configs/MultiWii_2_X folder that matches your configuration.
  3. Find the existing config.h file.
  4. Rename config.h to my-config.h. This tells the Firmware Tool not to download and overwrite the file again and enables the "override" mode.
  5. Edit and make your desired changes to the my-config.h file - do not edit anything in {?..} brackets!

This tutorial will show you how to move from using the Firmware Config Tool to using the Arduino IDE. Using the Arduino IDE allows you to modify more advanced settings and to modify the code itself. If you are into programming and want to experiment with MultiWii you've come to the right place!

For some users working with the Arduino IDE will be daunting. There is relief, I am working on the next version of the Firmware Tool which will enable editing of the config.h file directly. On the heels of that Firmware Tool release will come another that will automatically download, install and configure the Arduino IDE just as it does the MultiWii Config GUI now...with the click of a button.

Download the vanilla MultiWii Source

In the meantime, just take the Vanilla (original) MultiWii code from code.google.com/MultiWii and replace the config.h file with the contents from the Firmware Tool's Review page. This will copy all of your settings from the Firmware Tool over to the Arduino IDE source code.

You’ll also need to edit a section of def.h file as well, Around line 900 you should see the QUADRINO_ZOOM section below. Comment out the sensors since they will be defined in the config.h instead. The whole section should look like this:

def.h, line ~900
#if defined(QUADRINO_ZOOM)
//  #define ITG3200
//  #define BMA180
//  #define BMP085
//  #define HMC5883
  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  = -X; accADC[PITCH]  = -Y; accADC[YAW]  =  Z;}
  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] =  Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
  #define MAG_ORIENTATION(X, Y, Z)  {magADC[ROLL]  =  X; magADC[PITCH]  =  Y; magADC[YAW]  = -Z;}
  #define STABLEPIN_PINMODE pinMode (A2, OUTPUT);
  #define STABLEPIN_ON PORTC |= (1<<2);
  #define STABLEPIN_OFF PORTC &= ~(1<<2);
#endif