Remote and Flightcontroller code not working

Hello I have built a transmitter and a drone with a receiver with a flightcontroller and I am trying to get a connection with this code between them to be able to fly the drone

The remote and receiver code is attached cause the post became too long to be able to post.

Any idea to what might cause it not to work? Any help is much appreciated!
Thanks!

remote.ino (1.81 KB)

quadcopter_stabilization_2.ino (12.8 KB)

Without knowing what components you're using or how they are connected or how everything is powered? Not much idea.

Have you tried any basic code just connecting the remote to its receiver to test if anything is being sent and received?

Steve

I have with much simpler code and it works but with this one I just dont get it to work.

The schematics used for the remote and reciver. On the reciver I just added a Gy-521

What are you getting on the serial output? Do you see "Initializing I2C devices..." and "Testing device connections..." and "MPU6050 connection successful"? What else shows up?

Any idea to what might cause it not to work?

Define 'not to work'!
Does it not power on, does it do something - just not what you expected, does it do anything at all?

I dont get anything comming from the remote everything else is successful are successful.

Go back to your

"I have with much simpler code and it works but with this one I just dont get it to work. "

which you might share here, please.

Go back to code that worked, and look to see if the code you are failing with uses the radios in the same exact manner.

How do you even know you are not "get[ting] anything" from the remote? How can you try to deduce whether it is the remote transmitter or the receiver where you are failing?

a7

client02:
I dont get anything comming from the remote everything else is successful are successful.

//radio
RF24 radio(3, 2);


#define INTERRUPT_PIN 2  // use pin 2 on Arduino Uno & most boards

void setup()
{
  pinMode(INTERRUPT_PIN, INPUT);

  radio.begin();


  attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING);

It looks like you are using Pin 2 for both communicating with the radio and for an interrupt from the MPU6050. That is likely to cause problems.

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