speed up while in loop in different delay

hai..
please help add analog in for potentiometer for speed up.

i create led patterns but each pattern already in different delay.. how to control speed with potentiometer without change/erase "delay():" in patterns.. basically there using code "delay(value)" to speed up/low with potentiomter coonect analog in.. but if with that corde then i must changel all delay in already pattern.. that not what i want..

example pattern 1 delay 100, pattern 2 delay 50, pattern 3 delay 200, i want when speed up 30% so all delay will raise up 30% (pattern 1 from 100 up to 30%, pattern 2 from 50 up to 30%, ...)

void loop {
//what code to add here to speed up/low wihtout change the first delay already added in pattern

{pattern 1;
delay(100); 
}

{patternt 2;
delay(50);
}

{pattern 3;
delay(200);
}

}

OK, the first problem is that you are using "delay()". This function has extremely limited value - and I mean that - in "real" programs, and you have fallen into a common trap. :astonished:

Please study this topic and do some heavy thinking! :grinning:

If it needs to react immediately, see above reply.

Else you can base the delay on the analog read; in it's simplest form delay(analogread(A0)); (assumes A0 for the analog pot) which will give you a delay between 0 and 1023 milliseconds.