Synced movement LED and SERVO

Hello,
I am trying to make two servos move and have for each servo a fading LED strip. I am using the VarSpeedServo library to create a sequence of positions for each servo. Further I am triggering those sequences with capacitive touch sensors using the CAP1188 breakout board.
I figured out that I need a transistor for my 12V LED strips to make them fade. But my problem is I am not sure how I could sync them with the servo movement.

Thanks you and I appreciate any help. If more precise information is needed, I am happy to tell more.

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_CAP1188.h>

#include <VarSpeedServo.h>

// Reset Pin is used for I2C or SPI
#define CAP1188_RESET  52

// On Mega/ADK/Due, SDA == Digital 20, SCL == Digital 21

// Use I2C, no reset pin!
Adafruit_CAP1188 cap = Adafruit_CAP1188();

VarSpeedServo myservo1;
VarSpeedServo myservo2;
const int servoPin1 = 11;
const int servoPin2 = 12;



servoSequencePoint sqa[] = {{60,20},{100,10},{155,30}};// go to position 60 at speed of 20...
servoSequencePoint sqb[] = {{155,120},{60,120},{155,120}};
servoSequencePoint sqc[] = {{155,40},{100,60},{130,120}};

void setup() {
  Serial.begin(9600);
  Serial.println("CAP1188 test!");


myservo1.write(155,200);
myservo2.write(155,200);

  if (!cap.begin()) {
    Serial.println("CAP1188 not found");
    while (1);
  }
  Serial.println("CAP1188 found!");
  myservo1.attach(servoPin1);
  myservo2.attach(servoPin2);
}

void loop() {
  uint8_t touched = cap.touched();

  if (touched == 0) {
    
    return;
  }
  
  for (uint8_t i=0; i<8; i++) {
    if (touched & (1 << 0)) {
      Serial.print("C"); Serial.print(i+1); Serial.print("\t");
      myservo1.sequencePlay(sqa,3);
  }
  
    for (uint8_t i=0; i<8; i++) {
    if (touched & (1 << 1)) {
      Serial.print("C"); Serial.print(i+1); Serial.print("\t");
      myservo1.write(155);
  }
  
   for (uint8_t i=0; i<8; i++) {
    if (touched & (1 << 2)) {
      Serial.print("C"); Serial.print(i+1); Serial.print("\t");
      myservo1.sequencePlay(sqc,3);
  }
  
   }
  
  Serial.println();
  delay(20);
}
  }}

There's too much variables in your question and your sketch.
Tell more about your LED strips, what needs to fade (the entire strip, some LEDs or just the last LED that are lit for instance) and what this fade relates to (like desired position, actual position, time to desired position, or speed ?).

I'm not sure everything i mentioned above is possible, but you need to elaborate on what you want.

Hello,
in simple I need to make two servos move and for each servo is one led strip that changes brightness. The brightness should depend on the position of the servo. For example 160degree = 0 brightness; 55degree = 255 brightness.
I am using two red 12V led strips connected through a TIP122 for controlling the brightness.

So lets say I am triggering a servo sequence. How can I make the LEDs fade depending on the position and speed of this sequence?
servoSequencePoint sqa = {{60,20},{100,10},{155,30}};// go to position 60 at speed of 20...

I hope its better understandable now.
Thank you

Yes, that makes it clear.

Study the map function (click !).
It will allow you to tie two values to each other, just what you are looking for.

I am not sure how I could map the same values of the servo sequence to the LEDs fading.
I am using the VarServoSpeed library and triggering it with a CapSensor using CAP1188.

I have this code so far that makes the servos move in a certain sequence if the sensor is activated. Can I do the same with the LEDs?

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_CAP1188.h>

#include <VarSpeedServo.h>

// Reset Pin is used for I2C or SPI
#define CAP1188_RESET  52

// On Mega/ADK/Due, SDA == Digital 20, SCL == Digital 21

// Use I2C, no reset pin!
Adafruit_CAP1188 cap = Adafruit_CAP1188();

VarSpeedServo myservo1;
VarSpeedServo myservo2;
const int servoPin1 = 11;
const int servoPin2 = 12;



servoSequencePoint sqa[] = {{60,200},{100,10},{155,20},{80,30},{60,80}};// go to position 100 at speed of 20, position 20 speed 20, position 60, speed 50

void setup() {
  Serial.begin(9600);
  Serial.println("CAP1188 test!");


myservo1.write(155,200);
myservo2.write(155,200);

  if (!cap.begin()) {
    Serial.println("CAP1188 not found");
    while (1);
  }
  Serial.println("CAP1188 found!");
  myservo1.attach(servoPin1);
  myservo2.attach(servoPin2);
}

void loop() {
  uint8_t touched = cap.touched();

  if (touched == 0) {
    
    return;
  }
  
  for (uint8_t i=0; i<8; i++) {
    if (touched & (1 << 0)) {
      Serial.print("C"); Serial.print(i+1); Serial.print("\t");
      myservo1.sequencePlay(sqa,5);
      myservo2.sequencePlay(sqa,5);
  }
  

  
  Serial.println();
  delay(20);
}
  }

I misread that part before, sorry.
I thought you wanted to have the fade level to the desired position, and that is possible.
I now read you want to show the the percentage of the move the servo is making at that moment (?)
If you want that indeed, you'd have to alter that library in such way it will handle that too.
Or you could consider doing this sequence and the fading yourself.