switch between functions with potentiometer

Hi everybody,

First of all sorry for my English i'm not really a native speaker...

So I'm working on a project but I definitely have problem with the code (i've arduino uno)

I have a led-strip and want to set up different functions (like one that make leds blinks, another that put leds to red, green...) To switch between these I thought to use a potentiomètre. I made a test program but this is not working like I would.

What I want is to switch directly when turning the potentiometer but in my case I always need to wait the functions to be completely finish before the program detect a change with the potentiometer.

I tried to use multi tasking like OS48 but this is not working at all...

Is there a solution to make the arduino verifying a value all the time and directly change functions when it does ? (So exit the actual function and switch to another)

Hoping this is clear :slight_smile:

Thanks a lot

Alexis

I can't understand why you thought your question has something to do with

Improvements for the web system, applications to moderator, spam, etc

I have suggested to the Moderator to move this to the Project Guidance section.

In any case, if you need assistance you should post the program you are having trouble with.

...R