Coding Two LEDs and Potentiometer with cut off time on

Thank you for reply and info. i will read through them and see how i get on.