I have an Arduino UNO set up with a potentiometer to adjust the amount of time(up to 10 seconds at present) a relay closes a pair of contacts when a magnet slides by a hall effect switch. The problem the setup is having is when the magnet is stationary over the hall effect switch, then the relay contacts stay closed until the magnet is moved away. I need the relay to stay on for the set time and then turn off until the magnet passes by again. Is it possible to program this function into the UNO and if so, would someone point me to a tutorial to help me figure this out. This is my first project with a microcontroller and programming anything other then a VCR. I have searched the forums for similar issues without any success. Sure would appreciate any advice you can give me. Thanks, John