# Herelink Zoom Camera Control with 2 channels

**URL:** <https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847>\
**Category:** HereLink\
**Created:** [17 November 2021 19:15 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847 "2021-11-17T19:15:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [17 November 2021 19:15 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/1 "2021-11-17T19:15:19Z")

</div>

Hi

We are building a gimbal camera with zoom controll. We are usgin Herelink and the scroll wheel is used for the pitch, and as we dont have another wheel, we want to use 1 button to zoom out and a second button to the zoom out. The thing is the zoom cotroll from the camera only has 1 channel to do that, 1100 to zoom out, 2000 to zoom in, 1500 to do nothing.

So, to remote the zoom with the HereLink and 2 buttons, I will need to assign the same channel to 2 differents buttons. Is that posible?

Thanks!

---

<div class="post-metadata">

**Author:** ![Sven](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/sven/32/3367_2.png) [@Sven](https://discuss.cubepilot.org/u/Sven)\
**Post date:** [17 November 2021 19:18 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/2 "2021-11-17T19:18:50Z")

</div>

I have assigned 2 different buttons to the same SBUS channel for flight mode switching. That works. So your’s should work as well.

---

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [17 November 2021 19:37 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/3 "2021-11-17T19:37:48Z")

</div>

great! you did that with the last HereLink FW?

---

<div class="post-metadata">

**Author:** ![Sven](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/sven/32/3367_2.png) [@Sven](https://discuss.cubepilot.org/u/Sven)\
**Post date:** [17 November 2021 20:19 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/4 "2021-11-17T20:19:08Z")

</div>

Yes 👍

---

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [17 November 2021 20:51 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/5 "2021-11-17T20:51:45Z")

</div>

Updating…

---

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [18 November 2021 11:56 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/6 "2021-11-18T11:56:00Z")

</div>

I have updated to the last FW and i still getting the same error, can you show me how ou did it?

![imagen](https://discuss.cubepilot.org/uploads/default/original/2X/0/046a5784681eb4d360c91ef42566100158ffb9d3.jpeg)  
 ![imagen](https://discuss.cubepilot.org/uploads/default/original/2X/d/d76f662bbf0b2bf8d6ed26610448c87fc4de0553.jpeg)

thanks

---

<div class="post-metadata">

**Author:** ![Sven](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/sven/32/3367_2.png) [@Sven](https://discuss.cubepilot.org/u/Sven)\
**Post date:** [18 November 2021 12:18 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/7 "2021-11-18T12:18:31Z")

</div>

Hi, when you assign 2 buttons to the same channel it cannot be momentary or toggle. When you deactivate toggle on both of them it will work. Each button can then set the PWM output to the desired value. Maybe you need 3 buttons then if you need 1100, 2000 and 1500.

Example below:

 ![image](https://discuss.cubepilot.org/uploads/default/original/2X/e/e08e3ecee319b1238e2b153c8d4329f9e445eee2.jpeg)

---

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [18 November 2021 12:20 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/8 "2021-11-18T12:20:19Z")

</div>

Totally right!

Now works like a charm!

Thanks!!!

---

<div class="post-metadata">

**Author:** ![RoboMotic](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/robomotic/32/947_2.png) [@RoboMotic](https://discuss.cubepilot.org/u/RoboMotic)\
**Post date:** [18 November 2021 12:28 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/9 "2021-11-18T12:28:47Z")

</div>

Sorry to bother you, but now I have another problem… As the zoom works as 1100 zoom in, 1500 do nothing and 2000 zoom out, with this setup I only can do the max zoom and min zoom. I need to set when the buttons release, set the channel to 1500… any idea?

thanks!

---

<div class="post-metadata">

**Author:** ![Sven](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/sven/32/3367_2.png) [@Sven](https://discuss.cubepilot.org/u/Sven)\
**Post date:** [18 November 2021 12:39 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/10 "2021-11-18T12:39:15Z")

</div>

Suggest you can use a 3rd button to set to 1500.

Or use the long press of the same button to set to 1500.

Or maybe something like this:

Button 1 long press: zoom in  
Button 1 short press: 1500, do nothing

Button 2 long press: zoom out  
Button 2 short press: 1500, do nothing

Not sure… Would need to be tested…

---

<div class="post-metadata">

**Author:** ![hextd](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/hextd/32/3257_2.png) [@hextd](https://discuss.cubepilot.org/u/hextd)\
**Post date:** [18 November 2021 21:27 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/11 "2021-11-18T21:27:11Z")

</div>

If you are using a fast autopilot I would go for Arducopter LUA scripting. Then you can use the wheel to modify different channels depending on the state of another channel.

E.G. if rc channel 8 is low, the wheel (rc channel 6) modifies the output of channel 9 (pitch) and if rc channel 8 is high it modifies channel 10 (zoom). If you use long press to switch channel 8 you could use short press for channel 7 and use it to reset channels 9 and 10 whatever you like.

---

<div class="post-metadata">

**Author:** ![hextd](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/hextd/32/3257_2.png) [@hextd](https://discuss.cubepilot.org/u/hextd)\
**Post date:** [18 November 2021 21:31 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/12 "2021-11-18T21:31:28Z")

</div>

> [@Sven](#):
>
> I have assigned 2 different buttons to the same SBUS channel for flight mode switching. That works. So your’s should work as well.

@Sven, how do you do the flight mode switching? My latest information is, that flight mode switching (all but failsafe) should be realized via Mavlink for safety reasons?

---

<div class="post-metadata">

**Author:** ![Sven](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/sven/32/3367_2.png) [@Sven](https://discuss.cubepilot.org/u/Sven)\
**Post date:** [19 November 2021 07:49 UTC](https://discuss.cubepilot.org/t/herelink-zoom-camera-control-with-2-channels/7847/13 "2021-11-19T07:49:17Z")

</div>

Hi @hextd. That’s right. I have only assigned Loiter and RTL to buttons in the Herelink settings. I want to be able to switch to a safe mode in case GCS app crashes and does not recover (however, it never happened to me so far).

I think it is as important to ensure that the flight modes assigned to channel 5 in the FC are only safe ones. So in case of an undefined/unwanted PWM value it can only switch to a safe flight mode.

![image](https://discuss.cubepilot.org/uploads/default/original/2X/2/2057b94973ea853ea4e14e7f5dd885df389165d7.jpeg)
