Flying Wing -> Pin Replacement

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Flying Wing -> Pin Replacement

Post by Kayle »

Hello,

for Flying Wing the Servo[0] and Servo[1] are used. No i must use another Pin´s on my Pro Mini. Can i simply change the statements: Servo[0] and Servo[1] to Servo[3] and Servo[4] which were used in Plane Mode ?

Kay

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying Wing -> Pin Replacement

Post by PatrikE »

You need to modify def.h

Code: Select all

#elif defined(FLYING_WING)
  #define NUMBER_MOTOR     1
  #define PRI_SERVO_FROM   1 // use servo from 1 to 2
  #define PRI_SERVO_TO     2


If you set PRI_SERVO_TO 7
It's possible to use all servos like the airplane.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Flying Wing -> Pin Replacement

Post by Hamburger »

you may loose feedback in GUI, not sure?
Maybe you better change pin asignment for servo0 and servo1?

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: Flying Wing -> Pin Replacement

Post by Kayle »

Hi and thanks for the quick answers.

Maybe you better change pin asignment for servo0 and servo1?


How can i do that ?

Kayle

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Flying Wing -> Pin Replacement

Post by PatrikE »

In def.h
It looks like this.

Code: Select all

  #define SERVO_1_PINMODE            pinMode(A0,OUTPUT); // TILT_PITCH - WING left
  #define SERVO_1_PIN_HIGH           PORTC |= 1<<0;
  #define SERVO_1_PIN_LOW            PORTC &= ~(1<<0);

Find this

Code: Select all

  #define SERVO_5_PINMODE            pinMode(11,OUTPUT); // BI LEFT
  #define SERVO_5_PIN_HIGH           PORTB |= 1<<3;
  #define SERVO_5_PIN_LOW            PORTB &= ~(1<<3);


Swap SERVO_5 and SERVO_1 to change pins on between A0 and D11

Kayle
Posts: 141
Joined: Sun Feb 13, 2011 6:45 pm

Re: Flying Wing -> Pin Replacement

Post by Kayle »

Thanks PatrikE. I did the test with your first comment. I Change PRI_SERVO_TO 7. It works, but in the GUI like Hamburger wrote the Servo Display doesn´t work anymore. I will try your last comment.

Thanks
Kayle

Post Reply