Code review bicopter

Hello!!!

For more than a year I have been building a bicopter from scratch.

I have advanced pretty well by now and I really appreciate if someone can review my code and give me some advice to make the bicopter as stable as possible

Thanks in advance!!!
Marco

flight_controler.ino (14.2 KB)

1 Like

Do you think it might be helpful to inform forum members whether your bicopter can even fly?
If so, how well does it perform?

Thanks for the answer

It can but it is vary unstable. I am playing with the pid values

Give the details of the copter behavior, your efforts and the results of those efforts.

Then, perhaps someone can help.

I am trying to find the proper pid variables por p,i,d but i get oscilation

I implemented a dual pid loop for the motor axis but I am not 100% sure that I am doing that right.

Any comment is more than welcome

Cheers,
Marco

Hey guys,

I am working on a project and I really do not know if I am getting some kind of interference between the different sensors I am using

I am using the following

  • mpu6050
  • hcsr04 ultrasonic sensor
  • 2 brushless motors
  • 2 servos
  • arduino nano

I tried everything timers for the motors, the servo library. the mpu library, raw reading the mpu values.

I do not know why at some momento the mpu readings get crazy

I appreciate your comments.

Cheers,
Marco

bicopter_rc_pid2_vAltitude.ino (15.9 KB)

I open a new topic with more info
https://forum.arduino.cc/index.php?topic=581062.0

With 121 posts, you should realize that this is an unneccesary cross post, and contains far too little information for anyone to help.

jremington:
With 121 posts, you should realize that this is an unneccesary cross post, and contains far too little information for anyone to help.

Thanks man for the suggestion!

If you only have complains just do not waste your Time

Cheers!
Marco

1 Like

rossi86m:
Thanks man for the suggestion!

If you only have complains just do not waste your Time

Cheers!
Marco

If all you can do is waste time, DON'T CROSS-POST.