Update the LED pattern helper to use a more robust testing method