First, you really need to add some sleep commands into that infinite loop otherwise it could very well crash your game ;)
Second, I'm pretty sure the redstone output has to stay on for at least 1 tick (1/20th of a second) to get recognised by the filter (again sleep() )
Third, you don't reset...