[SOLVED] Arduino's refresh rate drops a lot as soon as multiwii is armed!

Hey everyone, I'm trying to get multiwii to work but it has some problems, everything is ok until I arm my plane, as soon as I arm it, it somehow crashes. I have recorded a 1 minute video so you can see what exactly happens. Look what happens as soon as I raise AUX3 to the middle which is supposed to arm the plane. It seems that the refresh rate of arduino drops a lot (you can see in the vide that "cycle time" drops from 2800 to some negative values!
link to the video
If a servo is connected to the board, it won't behave normally after I try to arm my plane.
I am using this code which allows me to use only one arduino with nrf24l01 and gy521, but I have tried using original multiwii code with 2 arduinos and had exactly the same problem.
I am powering all arduino, gy521 and nrf24l01 with one usb cable attached to my laptop. nothing else is connected. (no servos, etc.)
Do you have any ideas what can cause such problem?

The negative values are no doubt overflows of an integer too small to report the true number, so like 48000.

You describe is ambiguous. You say it fails if the servo is attached, and you say no servo is attached.

Please supply a schematic, with particular certainty to show how power is provided to all the components.

Please supply a link to the Arduino sketch or sketches that you are using and

please tell us if you have made any modifications to that firmware. If so, post your version of what is running.

This has been programmed and flown by thousands of ppl, it is probable that you have some faults in your hardware or wiring or your own changes to the code.

Not saying it is a challenge, just that it is a well worn path.

And by crash, we assume you mean the program crashes]d straightaway, not your aeroplane. :expressionless:

a7

1 Like

You were right, it was caused by my changes to the code, I found it out as I was replying you, trying to provide the original and clean code!
Btw, I meant at the time of recording the video, no servos were connected, but before that, I tried connecting a servo and the servo became laggy too.
Thank u so much, I spent really long time on this!

And by crash, we assume you mean the program crashes]d straightaway, not your aeroplane. :expressionless:

yea thankfully the plane didn't crash :stuck_out_tongue_winking_eye:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.