MultiWii / Arduino / Error Compiling Problem !

Post Reply
bob195558
Posts: 38
Joined: Wed Jul 17, 2013 1:16 pm
Location: New England, USA

MultiWii / Arduino / Error Compiling Problem !

Post by bob195558 »

Hi

I am getting Error Compiling with the arduino-1.0.3 when using:
MultiWii_MEGA1_GPS.zip / (https://www.dropbox.com/sh/4p9doebi2lyje2p/IilIQ5y7Xi).

I have also tried Compiling: MultiWiiV1_7.zip / (https://code.google.com/p/multiwii/down ... p&can=2&q=) /
(https://code.google.com/p/multiwii/downloads/list) with the same Error Compiling with using arduino-1.0.3.
I also tried the other ones and they all fail with Error Compiling.

With this older MultiWii Board, I am not sure what model it is.
I know it is from Witespyquad (Ready to Fly Quads) and it looks like it is this one: MultiWii PRO Flight Controller w/ GPS Option (http://witespyquad.gostorego.com/flight ... oller.html).
MultiWii PRO Flight Controller Board
MultiWii PRO Flight Controller Board


I am using arduino-1.0.3 and all the firmware downloads for this MultiWii Board are Error Compiling.

Bob B.

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by waltr »

The Drop box seems to be missing files. MW 2.3 has 26 files. what I think witespy has in there are only the files that needed changes for the features (GPS, etc). Examine the files from download from the MW repository to see this.
What to try:
Setup a Folder with all the MW files from unzipping MW 2.3 from the repository. Then copy all the files from Witespys drop box into that folder. Click yes to replace files. Now try a build.

bob195558
Posts: 38
Joined: Wed Jul 17, 2013 1:16 pm
Location: New England, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by bob195558 »

waltr wrote:The Drop box seems to be missing files. MW 2.3 has 26 files. what I think witespy has in there are only the files that needed changes for the features (GPS, etc). Examine the files from download from the MW repository to see this.
What to try:
Setup a Folder with all the MW files from unzipping MW 2.3 from the repository. Then copy all the files from Witespy's drop box into that folder. Click yes to replace files. Now try a build.


Hi waltr,
I tried what you suggested and it is still having the Compiling Errors.

I think trying this firmware: MultiWii_2_2, from the: (https://code.google.com/p/multiwii/downloads/list), it has less Compiling Errors.

I found a little info about arduino Compiling Errors and was able to fix some of the errors in this MultiWii_2_2 firmware.

There are still six groups of Compiling Errors that I do not understand how to correct.

1) The First group is: Alarms: alarmArray[0] = 0; //reset toggle bit

A Message says: expected unqualified-id before 'else'

In file included from MultiWii.ino:14:
/def.h:1807:10: error: #error "NUMBER_MOTOR is not set, most likely you have not defined any type of multicopter"

Alarms:167: error: expected unqualified-id before 'else'
Alarms.ino: In function 'void alarmHandler()':
Alarms:93: error: 'i2c_errors_count' was not declared in this scope
Alarms:93: error: 'alarmArray' was not declared in this scope
Alarms:94: error: 'alarmArray' was not declared in this scope
Alarms.ino: In function 'void patternDecode(uint8_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t)':
Alarms:169: error: 'alarmArray' was not declared in this scope
Alarms.ino: In function 'void turnOff(uint8_t)':
Alarms:186: error: 'BUZZERPIN_OFF' was not declared in this scope
Alarms:192: error: 'LEDPIN_OFF' was not declared in this scope
Alarms.ino: In function 'void blinkLED(uint8_t, uint8_t, uint8_t)':
Alarms:310: error: 'LEDPIN_TOGGLE' was not declared in this scope
Alarms.ino: In function 'void toggleResource(uint8_t, uint8_t)':
Alarms:364: error: 'LEDPIN_ON' was not declared in this scope
Alarms:365: error: 'LEDPIN_OFF' was not declared in this scope

2) The Second group: EEPROM

EEPROM.ino: In function 'void readGlobalSet()':
EEPROM:11: error: 'global_conf' was not declared in this scope
EEPROM:14: error: 'ROLL' was not declared in this scope
EEPROM.ino: In function 'void readEEPROM()':
EEPROM:23: error: 'global_conf' was not declared in this scope
EEPROM:25: error: 'conf' was not declared in this scope
EEPROM:34: error: 'lookupPitchRollRC' was not declared in this scope
EEPROM:41: error: 'lookupThrottleRC' was not declared in this scope
EEPROM:42: error: 'MAXTHROTTLE' was not declared in this scope
EEPROM.ino: In function 'void writeGlobalSet(uint8_t)':
EEPROM:79: error: 'global_conf' was not declared in this scope
EEPROM.ino: In function 'void writeParams(uint8_t)':
EEPROM:92: error: 'global_conf' was not declared in this scope
EEPROM:94: error: 'conf' was not declared in this scope
EEPROM.ino: In function 'void LoadDefaults()':
EEPROM:104: error: 'conf' was not declared in this scope
EEPROM:104: error: 'ROLL' was not declared in this scope
EEPROM:105: error: 'PITCH' was not declared in this scope
EEPROM:106: error: 'YAW' was not declared in this scope
EEPROM:107: error: 'PIDALT' was not declared in this scope
EEPROM:109: error: 'PIDPOS' was not declared in this scope
EEPROM:109: error: 'POSHOLD_P' was not declared in this scope
EEPROM:109: error: 'POSHOLD_I' was not declared in this scope
EEPROM:110: error: 'PIDPOSR' was not declared in this scope
EEPROM:110: error: 'POSHOLD_RATE_P' was not declared in this scope
EEPROM:110: error: 'POSHOLD_RATE_I' was not declared in this scope
EEPROM:110: error: 'POSHOLD_RATE_D' was not declared in this scope
EEPROM:111: error: 'PIDNAVR' was not declared in this scope
EEPROM:111: error: 'NAV_P' was not declared in this scope
EEPROM:111: error: 'NAV_I' was not declared in this scope
EEPROM:111: error: 'NAV_D' was not declared in this scope
EEPROM:113: error: 'PIDLEVEL' was not declared in this scope
EEPROM:114: error: 'PIDMAG' was not declared in this scope
EEPROM:116: error: 'PIDVEL' was not declared in this scope
EEPROM:123: error: 'CHECKBOXITEMS' was not declared in this scope
EEPROM:174: error: 'MINTHROTTLE' was not declared in this scope

3) The Third group: IUM

IMU.ino: In function 'void computeIMU()':
IMU:38: error: 'gyroADC' was not declared in this scope
IMU:42: error: 'annex650_overrun_count' was not declared in this scope
IMU:50: error: 'gyroADC' was not declared in this scope
IMU:52: error: 'gyroData' was not declared in this scope
IMU:54: error: 'ACC' was not declared in this scope
IMU:54: error: 'accADC' was not declared in this scope
IMU.ino: In function 'void rotateV(fp_vector*, float*)':
IMU:163: error: 'ROLL' was not declared in this scope
IMU:163: error: 'PITCH' was not declared in this scope
IMU:164: error: 'YAW' was not declared in this scope
IMU.ino: In function 'void getEstimatedAttitude()':
IMU:191: error: 'gyroADC' was not declared in this scope
IMU:194: error: 'accADC' was not declared in this scope
IMU:195: error: 'accSmooth' was not declared in this scope
IMU:199: error: 'acc_1G' was not declared in this scope
IMU:206: error: 'accSmooth' was not declared in this scope
IMU:206: error: 'ROLL' was not declared in this scope
IMU:206: error: 'acc_25deg' was not declared in this scope
IMU:206: error: 'PITCH' was not declared in this scope
IMU:206: error: 'YAW' was not declared in this scope
IMU:207: error: 'f' was not declared in this scope
IMU:209: error: 'f' was not declared in this scope
IMU:217: error: 'accSmooth' was not declared in this scope
IMU:236: error: 'angle' was not declared in this scope
IMU:236: error: 'ROLL' was not declared in this scope
IMU:237: error: 'PITCH' was not declared in this scope

4) The Forth group: MultiWii

MultiWii.ino: At global scope:
MultiWii:357: error: 'NUMBER_MOTOR' was not declared in this scope

5) The Fifth group: Output

Output.ino: In function 'void writeAllMotors(int16_t)':
Output:325: error: 'NUMBER_MOTOR' was not declared in this scope
Output:326: error: 'motor' was not declared in this scope
Output.ino: In function 'void initOutput()':
Output:336: error: 'NUMBER_MOTOR' was not declared in this scope
Output.ino: In function 'void mixTable()':
Output:1276: error: 'motor' was not declared in this scope
Output:1277: error: 'NUMBER_MOTOR' was not declared in this scope
Output:1279: error: 'NUMBER_MOTOR' was not declared in this scope

6) The Sixth group: Serial

Serial.ino: In function 'void evaluateCommand()':
Serial:275: error: 'MULTITYPE' was not declared in this scope
Serial:349: error: 'NUMBER_MOTOR' was not declared in this scope
Serial:349: error: 'motor' was not declared in this scope

How are these errors corrected ? :?:

Bob B.

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by waltr »

The "was not declared in this scope" errors mean there is a file missing in the project directory, typically a missing or misnamed header file .

Why are you using MW2.2? The latest is MW2.3.

Did you download a fresh copy (.zip file) of MW2.3 and unzipped to a new folder and try building this without making any changes?
Doing this will ensure there is nothing wrong with the project files.

bob195558
Posts: 38
Joined: Wed Jul 17, 2013 1:16 pm
Location: New England, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by bob195558 »

waltr wrote:Why are you using MW2.2? The latest is MW2.3.
Did you download a fresh copy (.zip file) of MW2.3 and unzipped to a new folder and try building this without making any changes?
Doing this will ensure there is nothing wrong with the project files.

Hi waltr,
The author of a youtube video said, MW2.2 was more stable.
I will try the MW2.3 and report back the results.
waltr wrote:The "was not declared in this scope" errors mean there is a file missing in the project directory,
typically a missing or misnamed header file.

Also thank you for explaining the "was not declared in this scope" errors. I will look at this more.
Getting up to an understanding of how to use arduino is slow for me, but I will stay with it. :)

Bob B.

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by waltr »

There is good info on the Arduino web site so sending some time there reading will serve you well.

A year or so ago MW2.2 was more stable but there was a while ago and all the be MW2.3 issues have been fixed.
I have been running MW2.3 on multiple copters for over 6 months all have not found any issues. 2.3 is now the preferred version.

bob195558
Posts: 38
Joined: Wed Jul 17, 2013 1:16 pm
Location: New England, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by bob195558 »

Hi waltr,

First time downloading MW2.3 (https://code.google.com/p/multiwii/downloads/list) and using Arduino-1.0.3 version,
it did not compile. :(
So not to give up, I downloaded the newest Arduino-1.0.6 (windows) and installed it. :)
Then I downloaded MultiWii_2_3 again and after I made some selection changes, #define HEX6X, #define FFIMUv2,
#define GPS_SERIAL 2, #define NMEA, #define BOARD_NAME "MultiWii V2.3-" it did compile and I flashed it to the MultiWii Board.
I then open MultiwiiwinGUI 2.2.exe on my computer and USB connected them together and
did calibration to be able to test that everything was working properly.
Then I did a Saved-As to save a copy of this working firmware to my computer files.
So I now have a working, Arduino MultiWii Firmware as a foundation to go back to if I have problems in the future with compiling errors.

Perhaps, when I was trying the first time the MultiWii_2_3 firmware that failed to compile, maybe was because there was no type of multicopter and boards define and sensor definitions define ? :?:

The GPS works when I first flash the board, but after calibration it seem to not be working.
Is this because I do not have it connected to the Receiver and a Radio switch turning on the GPS Hold ? :?:
Or do I need some other GPS define activated ? :?:

I thank you for your help!

Bob B.

yahyaziakhan
Posts: 3
Joined: Fri May 22, 2015 12:28 pm

Re: MultiWii / Arduino / Error Compiling Problem !

Post by yahyaziakhan »

Hello everyone

I am using a Multiwii 328p for my quadcopter. Everthing had been loaded and it was working perfectly till one of my colleagues did something and the board stopped responding.
According to him he had changed some connections and the board got heated up.Now the program and all the settings in the board have been erased.

I tired uploading the program again, the board does connect to the computer, the port and driver is being recognized. The red lights are continuously on while the blue light blinks sometimes and goes off and does this often.
Now when i try to upload the program, or clear the EEPROM, it gives this error message:
avrdude: stk500_getsync(): not in sync: resp=0x00
i have checked the port, the board and the programmer too, everything is correct. The FTDI driver is also recognized. Everything is correct.
Can anyone tell me what could be the possible solution for this to work perfectly again??? And if i need to burn the bootloader, can someone tell me how to do it?

Thank you

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: MultiWii / Arduino / Error Compiling Problem !

Post by waltr »

You can try putting the Boot loader back in but this needs an ISP device.
It is possible the processor is now bad. The two options are:
1- un-solder the bad Atmel and solder on a new one and program in the boot loader.
2- buy a new MWC board.

yahyaziakhan
Posts: 3
Joined: Fri May 22, 2015 12:28 pm

Re: MultiWii / Arduino / Error Compiling Problem !

Post by yahyaziakhan »

Ok.. Well I got another multiwii board but the same problem happened again...
Do you think its the distribution board which is faulty??
Or maybe any motor or esc which might be giving more power to the board..
Can these be one of the reasons.. What should I change now?
Should I buy another distribution board?

Post Reply