how to trigger a servo movement through software once a way point is reached.

Forgive me if i broke a rule.. but i have a questions that kind of spills over into programming. So I will post it here. I have successfully attached a micro servo to a digital camera. I have the micro servo plugged into the retract gear port of my receiver. I can manually trigger it the camera by toggling the retract button on my remote control, there by taking a picture. What I want to do is have the ArduPilot control that when it arrives at a way point. I am not a programmer and need some help on how i can achieve this. Thanks...

Views: 22

Reply to This

Replies to This Discussion

Well, it is going to require a bit of programming, I'm afraid. It's something we'll be adding to the code in the future, but for now you'd have to do it yourself.

In the Servo tab, you'd need to add one more servo on a spare digital pin, copying everything that's been done for the other servos.

The trigger would be in the Waypoint tab, where it decides if it's hit a waypoint:

"void Waypoint_Switcher(int distance, byte radius)
{
static byte locked=0;
if((distance < radius)&&(locked==0))
{
locked=1;
current_wp++;
current_wp= (current_wp>wp_number) ? 0 : current_wp;
//Set_New_Waypoint(current_wp);
//Storing in eeprom...
eeprom_busy_wait();
eeprom_write_byte((byte*)0x0A,current_wp);
}
else
{
if(distance > radius)
locked=0;
}
}"

RSS

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service