nrf24l01+ w/ mpu6050 QUADCOPTER PROGRAM

I had found a faulty code in the internet, i have made some changes in it. I am not sure that it will work properly, please if someone can guide me with the code ,it would be great. the attached code is for the reciver

rec_quad.ino (22.2 KB)

What was wrong with it?
What changes did you make?
What results did you get when you tested it with your changes?

...R

the code did not stabilize the quadcopter.

i have not yet tested it...

i was waiting for someone to confirm that it would be safe to use this code, or the code is correct..

The statement "the code did not stabilize the quadcopter" provides no useful information on which to base a diagnosis.

Testing is the ONLY option.

Nobody could study the code and give a guarantee that it will be faultless.

And the absence of programming errors does not mean that the code will do what YOU want.

...R

i tested the code, its not working properly. in the test the quadcopter was very unstable, it was in the air for less than three seconds and fell up side down, very badly.

i guess the getstability() function is faulty. i dont understand anything.

yashshah99:
i tested the code, its not working properly. in the test the quadcopter was very unstable, it was in the air for less than three seconds and fell up side down, very badly.

i guess the getstability() function is faulty. i dont understand anything.

I don't know anything about quadcopter stability programs except that I expect it is a complex process. My feeling is that you will need to learn a lot about Arduino programming in general and about quadcopter control in particular before you know enough to pinpoint the problem.

The problem may be in the getstability() function but it could probably be anywhere - even something as simple as a variable that is the wrong type and is overflowing.

...R

yes , thank you sir