Porting Multiwii to Arduino DUE - Done

Post Reply
MHefny
Posts: 18
Joined: Sun Jan 05, 2014 4:27 pm
Location: Cairo, Egypt
Contact:

Porting Multiwii to Arduino DUE - Done

Post by MHefny »

Hi,

I worked during the last three weeks on adding Arduino_DUE to Multiwii v2.3.
The end result is a code that can be compiled on ordinary 8-bit Arduino as well as Arduino DUE.



For more details kindly check http://technicaladventure.blogspot.com/2014/05/porting-multiwii-to-arduino-due.html

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by copterrichie »

Awesome Job, I recently ordered a DUE for testing.

I use these mega shields available on eBay, maybe you can used one for this project.
Attachments
Megashield.JPG


io53
Posts: 10
Joined: Sun Jun 08, 2014 4:57 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by io53 »

Great work! I have barely touched my Due since I got it at release, the flash is starting to get rusty ;).
Tried it quickly yesterday before going to bed and noticed that the MPU6050 gyro values did not return to 0 when I tilted the sensor.
I was too tired to debug it yesterday, will try to see what it could be today if I find any spare time. Do you have any idea what it could be?

MHefny
Posts: 18
Joined: Sun Jan 05, 2014 4:27 pm
Location: Cairo, Egypt
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by MHefny »

I recompiled the code again to make sure there is no versioning issue in the uploaded one, and it worked as expected.
I found that the HK_MultiWii_328P is enabled in config.h by default so I commented it.

io53
Posts: 10
Joined: Sun Jun 08, 2014 4:57 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by io53 »

I think it is that the MPU6050 got both a ACC and GYRO on the same address that messes things up. When using both the acc and the gyro the values seem to get mixed, the gyro values acts more like a accelerometer and the acc values returns to 0 like gyro values.
When I disable the ACC in def.h the gyro values are working as they should.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by timecop »

io53 wrote:I think it is that the MPU6050 got both a ACC and GYRO on the same address that messes things up. When using both the acc and the gyro the values seem to get mixed, the gyro values acts more like a accelerometer and the acc values returns to 0 like gyro values.
When I disable the ACC in def.h the gyro values are working as they should.


Image

io53
Posts: 10
Joined: Sun Jun 08, 2014 4:57 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by io53 »

timecop wrote:gif


I'm the proud creator of the worst explanation in the history of MultiWii.
Maybe this will make it clearer ;)
https://www.youtube.com/watch?v=aNy5ir_JUMI

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by copterrichie »

MHefny wrote:Hi,

I worked during the last three weeks on adding Arduino_DUE to Multiwii v2.3.
The end result is a code that can be compiled on ordinary 8-bit Arduino as well as Arduino DUE.


Question for you please, considering the DUE is a large board anyway, would it be of any benefit using an add-on i2c eeprom device verse the eeprom emulator?

Example: AT24C256 Serial EEPROM Module I2C EEPROM Data Storage Module Arduino PIC

MHefny
Posts: 18
Joined: Sun Jan 05, 2014 4:27 pm
Location: Cairo, Egypt
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by MHefny »

copterrichie wrote:Question for you please, considering the DUE is a large board anyway, would it be of any benefit using an add-on i2c eeprom device verse the eeprom emulator?

Example: AT24C256 Serial EEPROM Module I2C EEPROM Data Storage Module Arduino PIC


Sure this is possible. I think using DUE memory is one things that makes this porting useful and straight forward. Same idea implemented in Naze32. Yes sure you can do that but what is the benefit you will get over internal memory giving the current data you need to save for multiwii.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by copterrichie »

MHefny wrote:
Sure this is possible. I think using DUE memory is one things that makes this porting useful and straight forward. Same idea implemented in Naze32. Yes sure you can do that but what is the benefit you will get over internal memory giving the current data you need to save for multiwii.



Please correct me here if I am wrong but is there a limited number of times the flash memory can be written to?

Thank you.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by timecop »

We're talking into tens of thousands of rewrite cycles, not something to really give a shit about.

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by brm »

timecop wrote:We're talking into tens of thousands of rewrite cycles, not something to really give a shit about.

depends on WHAT flash:
- MLC
- SLC

the later is ok - MLC can be as low as 800 read/write cycles.
depends what you pay for ;)

chinese stuff is prob. write only ...

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by timecop »

I was referring to internal flash on -modern MCUs.

shagerott
Posts: 2
Joined: Sun Sep 30, 2012 1:47 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by shagerott »

Can you confirm the status of the I2C GPS functions working on the Due? I'm working on a project that leverages portions of the Multiwii code base. We have all of our code working on the Due, except for the I2C functions which communicate with the I2C GPS Nav board. We have incorporated the portions of your code that are pertinent to these operations. We can get a successful detection of the I2C GPS NAV module, but cannot successfully retreive data from the registers.

Thanks for your great work on this project!

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: Porting Multiwii to Arduino DUE - Done

Post by timecop »

Why the FUCK would you care about I2C GPS on a board with like 5 serial ports?

MHefny
Posts: 18
Joined: Sun Jan 05, 2014 4:27 pm
Location: Cairo, Egypt
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by MHefny »

shagerott wrote:Can you confirm the status of the I2C GPS functions working on the Due? I'm working on a project that leverages portions of the Multiwii code base. We have all of our code working on the Due, except for the I2C functions which communicate with the I2C GPS Nav board. We have incorporated the portions of your code that are pertinent to these operations. We can get a successful detection of the I2C GPS NAV module, but cannot successfully retreive data from the registers.

Thanks for your great work on this project!


Pls chk my I2C updates in sensors.cpp i kept the function signature i changed the code.
But i never tried gps

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by servo23 »

Ciao MHefny
Scusa se ti scrivo in italiano.
Ho visto il tuo lavoro su arduino due e sono rimasto colpito complimenti.
cosi mi sono attrezzato o aggiunto External I2C EEPROM to Arduino (24LC256)
http://www.instructables.com/id/Adding- ... duino-Due/
Ma al momento non comunica con la MultiWiiWin GUI
vedi filmino, poi ce la SPEKTRUM sat che al momento della compilazione fa un errore

Dai MHefny che ce la facciamo se mi dai una mano.
In caso fai delle modiche al software, inserisci un file zip. nel forum.
Ciao, servo :D :D :D

https://www.youtube.com/watch?v=PNgAFpD ... e=youtu.be
Attachments
ARDUINO DUE 2.jpg
ARDUINO DUE 1.jpg

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Porting Multiwii to Arduino DUE - Done

Post by scrat »

servo23 wrote:Ciao MHefny
Scusa se ti scrivo in italiano.
Ho visto il tuo lavoro su arduino due e sono rimasto colpito complimenti.
cosi mi sono attrezzato o aggiunto External I2C EEPROM to Arduino (24LC256)
http://www.instructables.com/id/Adding- ... duino-Due/
Ma al momento non comunica con la MultiWiiWin GUI
vedi filmino, poi ce la SPEKTRUM sat che al momento della compilazione fa un errore

Dai MHefny che ce la facciamo se mi dai una mano.
In caso fai delle modiche al software, inserisci un file zip. nel forum.
Ciao, servo :D :D :D

https://www.youtube.com/watch?v=PNgAFpD ... e=youtu.be


MHefny will understand everything you wrote :)

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by servo23 »

If you want you can translate it with Google Translate
How can I when I do not know a language.

Ciao, servo ;)

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: Porting Multiwii to Arduino DUE - Done

Post by treym »


scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: Porting Multiwii to Arduino DUE - Done

Post by scrat »

servo23 wrote:If you want you can translate it with Google Translate
How can I when I do not know a language.

Ciao, servo ;)


:)

servo23
Posts: 22
Joined: Tue Apr 17, 2012 8:54 pm
Location: Lugano Svizzera
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by servo23 »

Ciao, scrat

Molto molto bene complimenti a Tinnakon Kheowree

Ho appena provato il programma ma non abbiamo gli stessi sensori fa in piccolo errore, vedi filmino
lui utilizza MPU6050C, ed io FreeIMU_v0_3_5_MS mi domandavo se e possibile
integrare la FreeIMU_v0_3_5_MS e la spektrum satellit che funziona a 3.3V nel programma
cosi da evitare il bec da 5V. a me piacciono le cose semplici meno cose ci sono e meno problemi ci sono.

Vedi foto la nuova configurazione e molto più semplice senza EEprom e con solo spektrum satellit.

Ciao, servo
------------------------------------------------------------------------------------------------------------------------------
Hello, scrat

Very very good compliments to Tinnakon Kheowree

I just tried the program but does not have the same sensors in little error, see home movie
he uses MPU6050C, and I FreeIMU_v0_3_5_MS I was wondering if it is possible to
integrate FreeIMU_v0_3_5_MS and spektrum satellit that runs at 3.3V in the program
so as to avoid the bec from 5V. I like things simple, there are fewer things and fewer problems there are.

See photo the new configuration and much easier without EEprom and with only spektrum satellit.

Hello,servo


http://youtu.be/u_llEXe0yVo
Attachments
IMG_0006.JPEG

MHefny
Posts: 18
Joined: Sun Jan 05, 2014 4:27 pm
Location: Cairo, Egypt
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by MHefny »

shagerott wrote:Can you confirm the status of the I2C GPS functions working on the Due? I'm working on a project that leverages portions of the Multiwii code base. We have all of our code working on the Due, except for the I2C functions which communicate with the I2C GPS Nav board. We have incorporated the portions of your code that are pertinent to these operations. We can get a successful detection of the I2C GPS NAV module, but cannot successfully retreive data from the registers.

Thanks for your great work on this project!


Sorry for taking so so long to answer .
i suspended the work on multiwii DUE since a while, it was a POC. that it is doable.

MHefny
Posts: 18
Joined: Sun Jan 05, 2014 4:27 pm
Location: Cairo, Egypt
Contact:

Re: Porting Multiwii to Arduino DUE - Done

Post by MHefny »

Please be informed that the source code is
https://github.com/HefnySco/MultiWii_DUE

Post Reply