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
Moving Cam Pins hint request...
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: Moving Cam Pins hint request...
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.
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);