Moving Cam Pins hint request...

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
Centurian
Posts: 44
Joined: Sat Jan 22, 2011 10:55 am

Moving Cam Pins hint request...

Post by Centurian »

I've been working on a stabilized cam mount on a tri and to get cam pitch & roll trim thru the arduino, I had to go to serial sum to have enought RX inputs. Occasionaly I get a big jump(I'd say the value is off scale for a 1/20 of a sec or so, the servo appears to move toward it's extreme then jump back to it's proper position ) on the camera, usally roll, but occasionaly pitch. I'd like to move the cam to pins 5 & 6 which I think are true "PWM" pins as used to drive the last 2 motors in hex config. I think this is beyond me as I think the pins use different calls for their writes. I havn't looked at the code yet, but I'd appreciate any advice.

FYI: I've tried a cheap HK mixer for cam pitch trim on another machine and it functions but it's a bit course(200 steps maybe?). I was concerned that the update rate from the RX & arduino would be different and the mixer would not work so this is encouraging news. Havn't flow the set up yet, so may prove to be satisfactory.

Thanks

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Moving Cam Pins hint request...

Post by Alexinparis »

Hi,

I don't think your problem of servo jump is linked to the PIN definition.
However, Sure it's possible to move them.

The fact that PIN 5&6 can be use for hardware PWM won't make them better for this use.

Code: Select all

  #define DIGITAL_TILT_PITCH_PINMODE pinMode(5,OUTPUT);
  #define DIGITAL_TILT_PITCH_HIGH    PORTD |= 1<<5;
  #define DIGITAL_TILT_PITCH_LOW     PORTD &= ~(1<<5);
  #define DIGITAL_TILT_ROLL_PINMODE  pinMode(6,OUTPUT);
  #define DIGITAL_TILT_ROLL_HIGH     PORTD |= 1<<6;
  #define DIGITAL_TILT_ROLL_LOW      PORTD &= ~(1<<6);

Post Reply