Try this test sketch.
I look forward to giving it a try!
I also learned two things from your code! First, I didn't ever think about digitalRead being a Boolen, but I guess HIGH == 1? And I didn't know you could put a conditional in digitalWrite! How did you know that? It's not in the reference: digitalWrite() - Arduino Reference. I love learning how to make code more elegant. Little is more satisfying than turning a big plate of spaghetti in a nice tight little packet of code :).