diff --git a/content/ardupilot/_index.md b/content/ardupilot/_index.md index ba7a03b..ae10e8b 100644 --- a/content/ardupilot/_index.md +++ b/content/ardupilot/_index.md @@ -10,6 +10,7 @@ Click on a link in the list below to go to that page: 1. [ArduPilot setup checklist](../../ardupilot/ardupilot-setup-checklist) 1. [Building ArduPilot](../../ardupilot/building-ardupilot) +1. [Configuring a switch as a relay](../../ardupilot/configuring-a-switch-as-a-relay) 1. [Reverse thrust](../../ardupilot/reverse-thrust) 1. [TECS tuning calculator](../../ardupilot/tecs-tuning-calculator) 1. [Transfer config between craft](../../ardupilot/transfer-config-between-craft) diff --git a/content/ardupilot/configuring-a-switch-as-a-relay.md b/content/ardupilot/configuring-a-switch-as-a-relay.md new file mode 100644 index 0000000..939bc51 --- /dev/null +++ b/content/ardupilot/configuring-a-switch-as-a-relay.md @@ -0,0 +1,23 @@ ++++ +title = "Configuring a switch as a relay" +weight = 3 +sort_by = "weight" +insert_anchor_links = "right" ++++ +If you want to connect a relay of some sort (something that accepts a low/high signal) to a PWM output (the servo outputs), you need to do a few quick things. The actual numbers will vary depending on your FC, but here's what worked for me with a Matek F405-Wing: + +1. Set the channel you want the relay to trigger on as a controller for the first relay (here I'll assume you want to control the first relay on channel 11): + `RC11_OPTION=28` +2. Set the pin number for the relay you want to control. This is a bit fuzzy, it depends on your flight controller, but try a few out. This is what worked for me, for S6 on my F405-Wing: + `RELAY_PIN=55` +3. Set a servo to act as a GPIO output. I'm assuming here you want `SERVO6`, though I'm not quite sure how the servo selection maps to the `RELAY_PIN` selection above. For me, `AUXOUT6` and `SERVO6` worked: + `SERVO6_FUNCTION=-1` + +If you're amazingly lucky, you should be all set. If not, you need to play with the `50` in the `RELAY_PIN` parameter and the `6` in the `SERVO6_FUNCTION` until something works. + +* * * + +

+Last updated on September 11, 2021. For any questions/feedback, +email me at hi@stavros.io. +

diff --git a/content/ardupilot/reverse-thrust.md b/content/ardupilot/reverse-thrust.md index d097f25..42eeeb1 100644 --- a/content/ardupilot/reverse-thrust.md +++ b/content/ardupilot/reverse-thrust.md @@ -1,6 +1,6 @@ +++ title = "Reverse thrust" -weight = 3 +weight = 4 sort_by = "weight" insert_anchor_links = "right" +++ diff --git a/content/ardupilot/tecs-tuning-calculator.md b/content/ardupilot/tecs-tuning-calculator.md index ff451b6..b406f3d 100644 --- a/content/ardupilot/tecs-tuning-calculator.md +++ b/content/ardupilot/tecs-tuning-calculator.md @@ -1,6 +1,6 @@ +++ title = "TECS tuning calculator" -weight = 4 +weight = 5 sort_by = "weight" insert_anchor_links = "right" +++ diff --git a/content/ardupilot/transfer-config-between-craft.md b/content/ardupilot/transfer-config-between-craft.md index eda1190..bf52d16 100644 --- a/content/ardupilot/transfer-config-between-craft.md +++ b/content/ardupilot/transfer-config-between-craft.md @@ -1,6 +1,6 @@ +++ title = "Transfer config between craft" -weight = 5 +weight = 6 sort_by = "weight" insert_anchor_links = "right" +++ diff --git a/content/ardupilot/tuning-the-tecs.md b/content/ardupilot/tuning-the-tecs.md index 4391a31..671b1a6 100644 --- a/content/ardupilot/tuning-the-tecs.md +++ b/content/ardupilot/tuning-the-tecs.md @@ -1,6 +1,6 @@ +++ title = "Tuning the TECS" -weight = 6 +weight = 7 sort_by = "weight" insert_anchor_links = "right" +++