i am trying to operate servo motor with apm
when i arm the drone and put down SWC to 3 position servo should rotate to clockwise
ultimately and when i switch SWC to 2 position motor should be stop.
how can i do this ???
is there anyway to program apm to do this type of work ???
Do you have an OpenTX or EdgeTX based radio ?
i have FLYSKY FS-i6 transmitter and reciver
Ok, I could help with OpenTX but not sure with a Flysky, I think it’s possible with a script but I’m no expert with that - sorry.
Just realised you’re using an APM which is unsupported hardware now I don’t think you can use scripting on that hardware.
First of all, check at the Radio Screen in Mission Planner if your SWC Switch is being read by ardupilot, and check which RC Channel is assigned to it. Also check your ranges and if you need to revert it or not.
After that, use the SERVO5_FUNCTION in order to assign this servo to receive the SWC Channel output (check the parameter list option for your 3.2 version), it should be some kind of RCX option, which X is the RC Channel you are using this switch.
If this procedure do not work, check your BRD_PWM_COUNT parameter to check if this port is configured for PWM Output.
Also consider to migrate to supported FC and update to Copter Version 4.
Arducopter V3.2.1, which is the last version supported for the APM, doesn’t have any of those parameters and the configuration structure is very different.
If you are interested attached is a parameter file from 3.2.1 that I saved today after blowing the dust off a very old quadcopter with an APM.
APM 3.2.1.param (5.0 KB)
So, from what I saw here @dkemxr it is not possible for a friend to do such thing in an APM right?
It’s certainly possible to configure a 3 position switch to do what he’s asking. The problem here is this version of firmware is so old there are not many around who still remember how to configure it. And if you connect an APM to the current version of Mission Planner the description fields in the Full Parameter List are limited so it’s difficult to figure out.
But, I have an functioning craft with an APM so I’ll see what I can do.
OK, this is simple once you know how that relic of a firmware version works. Let’s assume you want to use Output channel 8 on the APM to control the Servo. Set this parameter to 1 (PassThru)
Back then the Inputs and Outputs were not “separate” which means you have to configure a Channel 8 Mix on your radio (can’t assign others) to produce the 3 PWM levels you need. This is trivial to do on most radios. How it works on your radio is up to you to figure out.
BTW: I used Mission Planner version 1.3.26 (from 2016) to figure out the parameters options. I would suggest you install this version if you are going to keep that APM.
thank you soo much all of you i’ll try this than you