# Asking for help programming servos for my wedding lightsaber build

**URL:** <https://crucible.hubbe.net/t/asking-for-help-programming-servos-for-my-wedding-lightsaber-build/5320>\
**Category:** Off-topic\
**Created:** [May 25, 2024, 11:59pm UTC](https://crucible.hubbe.net/t/asking-for-help-programming-servos-for-my-wedding-lightsaber-build/5320 "2024-05-25T23:59:36Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![profezzorn](https://crucible.hubbe.net/user_avatar/crucible.hubbe.net/profezzorn/32/8_2.png) [@profezzorn](https://crucible.hubbe.net/u/profezzorn)\
**Post date:** [May 26, 2024, 7:54pm UTC](https://crucible.hubbe.net/t/asking-for-help-programming-servos-for-my-wedding-lightsaber-build/5320/8 "2024-05-26T19:54:09Z")

</div>

As stated in the previous thread:

> [@Proffie v2.2 or Teensy for Servo Motor Control](https://crucible.hubbe.net/t/proffie-v2-2-or-teensy-for-servo-motor-control/434/2):
>
> TIM2 is generally tied up with driving neopixels, ,and is generally set to 800kHz  
> TIM1, TIM15 and TIM16 are used to drive LED1-6 as follows:  
> TIM1 drives LED3, LED4 and LED6  
> TIM15 drives LED1 and LED5  
> TIM16 drives LED2

Since TIM2 controls two pads, it would be the natural choice for controlling two servos, but since it is also used for synchronization, that makes things more difficult. There are three choices:

1. Drive the two servos in parallel from TIM16 via LED2
2. Drive the two servos from TIM1 via LED3 and LED4. (LED6 would also be 50Hz, so it wouldn’t be very useful for driving accent LEDs, but could be used for neopixel power.)
3. Modify the code so that synchronization can use some other timer than TIM15.

(1) and (2) are easy  
(3) is more work, but still not that difficult.

---

_[View the full topic](https://crucible.hubbe.net/t/asking-for-help-programming-servos-for-my-wedding-lightsaber-build/5320)._
