Suspecting interrupt pin 0 and 1 clash

Hi everyone,

I am using dc motor(pin out 3 or int pin1), MPU6050(int pin0), two servos(pin in 9,10), one receiver(pin in 5,6,11), GY-63…
everything works fine ( reading sensor data, channels value, controlling servos) when the program starts, however, whenever I push the throttle to move the motor, the program is halt and cannot read further values and control servos.

I am a newbie in using arduino. I hope someone can point out where did I go wrong.

here’s the code:

Hong

Flapping_Wing_Complete.ino (10.6 KB)

Are you sure it's not a power supply issue? have you tested that your configuration is able to drive the motor without the board hanging or resetting?

Certainly sounds to be a case of inadequate power. You shouldn't be powering any motor or servo from the Arduino 5V rail, that is usually a disaster.

DrAzzy: Are you sure it's not a power supply issue? have you tested that your configuration is able to drive the motor without the board hanging or resetting?

HI DrAzzy,Thank you for highlight the power issue, currently I am using 3.3V pin, powering up 2 servos, a motor, MPU6050 and MS5611. Yes, the connection should be fine.

MarkT: Certainly sounds to be a case of inadequate power. You shouldn't be powering any motor or servo from the Arduino 5V rail, that is usually a disaster.

I am currently using 3.3V pin for all loads in the configuration. Is that means if I connect another power source to the motor the whole thing should work? Thank you.

You can only draw about 50mA from the 3.3V pin on the Uno, 2 servos and a motor are almost guaranteed to draw more than that.