2 Potentiometers controlling a single LED

You can use a little state machine which will make the code very easy to manage.