Airplane-Acrotrainer no servo on mega pls help
Airplane-Acrotrainer no servo on mega pls help
Hi all thanx for you're deep commitment and endless programing.
Moved from Mini to Mega to try Airplane-mode and now all servo goes berserk, tryed r1097 no success
pls help
Moved from Mini to Mega to try Airplane-mode and now all servo goes berserk, tryed r1097 no success
pls help
Re: Airplane-Acrotrainer no servo on mega pls help
Might be the same as documented here: viewtopic.php?f=8&t=2385
Re: Airplane-Acrotrainer no servo on mega pls help
Yes it's the same, i will go back to Mini so i can go flying with my giant P51, i am a bad rc flyer and need assistants when i'm loosing the concept
Re: Airplane-Acrotrainer no servo on mega pls help
So their seams to bee little or no interest in Mega and Acrotrainer, hm can somebody point me in the right direction, a bit confusing with all this code...
Re: Airplane-Acrotrainer no servo on mega pls help
I would be a great benfinit to get airplane mode work on Mega.
One serialport on ProMini is a BIG limitation for debugging GPS code!
Does someone have knowlage how the code is sopposed to work?
One serialport on ProMini is a BIG limitation for debugging GPS code!
Does someone have knowlage how the code is sopposed to work?
Re: Airplane-Acrotrainer no servo on mega pls help
maybe some interrupt hassle?
Ronco has been quiet for some time, so maybe go back to a real old version and check for servo functionality? At worst you will find it never did work.
Ronco has been quiet for some time, so maybe go back to a real old version and check for servo functionality? At worst you will find it never did work.
Re: Airplane-Acrotrainer no servo on mega pls help
yes, but it work's with the wing right, so with some reverse engineering it wold bee possible to get a clue
Re: Airplane-Acrotrainer no servo on mega pls help
It's been a problem for a long time!
Maby even before V1.8. The servo code was changed there somewhere.
Around the time when i was doing the Airplane implementation.
But i thougt it was my mega 1280 that was faulty.
Iw'e only used it on the desk for developing and not for flying.
Maby even before V1.8. The servo code was changed there somewhere.
Around the time when i was doing the Airplane implementation.
But i thougt it was my mega 1280 that was faulty.
Iw'e only used it on the desk for developing and not for flying.
Re: Airplane-Acrotrainer no servo on mega pls help
Hi, i try'd this in output, from unit8 to unit16 and it works for me
haven't run it on mini, think it's using 8 bit
#if defined(AIRPLANE)|| defined(HELICOPTER)
// To prevent motor to start at reset. atomicServo[7]=5 or 249 if reversed servo
volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,8000};
haven't run it on mini, think it's using 8 bit
#if defined(AIRPLANE)|| defined(HELICOPTER)
// To prevent motor to start at reset. atomicServo[7]=5 or 249 if reversed servo
volatile uint16_t atomicServo[8] = {8000,8000,8000,8000,8000,8000,8000,8000};
Last edited by Gimbal on Thu Sep 20, 2012 11:18 pm, edited 1 time in total.
Re: Airplane-Acrotrainer no servo on mega pls help
Itis clearly a bug! 8000 need 16 bits!
I'll test tomorrow..
I'll test tomorrow..
Last edited by PatrikE on Sat Sep 22, 2012 2:05 pm, edited 1 time in total.
Re: Airplane-Acrotrainer no servo on mega pls help
D2,3,5,6 servo ok D7,8,9,10 need to be rerouted
Re: Airplane-Acrotrainer no servo on mega pls help
Gimbal wrote:D2,3,5,6 servo ok D7,8,9,10 need to be rerouted
D7,8,9,10 Is not servoOutputs Only Motor.
Servos use. 2,3,5,6,33,34,35 & 37
I have tested an everything seems to work as expected now
Great find @Gimbal
I uploaded the Fix to _shared.
Re: Airplane-Acrotrainer no servo on mega pls help
Tnx P, my Chines board's using D7,8,9 and 10 but that's n easy fix in def.h right
Re: Airplane-Acrotrainer no servo on mega pls help
Can be fixed like this.
Add #define SERVO_ON_MEGA_MOTRORPINS in config
And In def
It would be a great option because like you say.
D 2,3,5,6,7,8,9&10 is routed on most boards.
But not 33,34,35 & 37.
Add #define SERVO_ON_MEGA_MOTRORPINS in config
And In def
Code: Select all
#if defined (SERVO_ON_MEGA_MOTRORPINS)
#define SERVO_1_PINMODE pinMode(10,OUTPUT); // TILT_PITCH - WING left
#define SERVO_1_PIN_HIGH PORTB |= 1<<4;
#define SERVO_1_PIN_LOW PORTB &= ~(1<<4);
#define SERVO_2_PINMODE pinMode(9,OUTPUT); // TILT_ROLL - WING right
#define SERVO_2_PIN_HIGH PORTH |= 1<<6;
#define SERVO_2_PIN_LOW PORTH &= ~(1<<6);
#define SERVO_3_PINMODE pinMode(8,OUTPUT); // CAM TRIG - alt TILT_PITCH
#define SERVO_3_PIN_HIGH PORTH |= 1<<5;
#define SERVO_3_PIN_LOW PORTH &= ~(1<<5);
#define SERVO_4_PINMODE pinMode (7, OUTPUT); // new - alt TILT_ROLL
#define SERVO_4_PIN_HIGH PORTH |= 1<<4;
#define SERVO_4_PIN_LOW PORTH &= ~(1<<4);
#else
// original servo defines
#define SERVO_1_PINMODE pinMode(34,OUTPUT);pinMode(44,OUTPUT); // TILT_PITCH - WING left
#define SERVO_1_PIN_HIGH PORTC |= 1<<3;PORTL |= 1<<5;
#define SERVO_1_PIN_LOW PORTC &= ~(1<<3);PORTL &= ~(1<<5);
#define SERVO_2_PINMODE pinMode(35,OUTPUT);pinMode(45,OUTPUT); // TILT_ROLL - WING right
#define SERVO_2_PIN_HIGH PORTC |= 1<<2;PORTL |= 1<<4;
#define SERVO_2_PIN_LOW PORTC &= ~(1<<2);PORTL &= ~(1<<4);
#define SERVO_3_PINMODE pinMode(33,OUTPUT); pinMode(46,OUTPUT); // CAM TRIG - alt TILT_PITCH
#define SERVO_3_PIN_HIGH PORTC |= 1<<4;PORTL |= 1<<3;
#define SERVO_3_PIN_LOW PORTC &= ~(1<<4);PORTL &= ~(1<<3);
#define SERVO_4_PINMODE pinMode (37, OUTPUT); // new - alt TILT_ROLL
#define SERVO_4_PIN_HIGH PORTC |= 1<<0;
#define SERVO_4_PIN_LOW PORTC &= ~(1<<0);
#endif
It would be a great option because like you say.
D 2,3,5,6,7,8,9&10 is routed on most boards.
But not 33,34,35 & 37.