Thanks for the template. How did you know I was planning to redo the lid?
By the way, what analog ports did you use for the switch? I think you used 0-4 (up, down, left, right, center), right? I'm not familiar with the const int xxBut = xx command to figure it out.