Using Touch LED to switch between programs?

I am trying to create a hybrid program that will allow me to switch between Arcade and Tank mode on the robot, using the Touch LED. I cannot seem to figure out how to make this work. Has anyone had success with this?

Which programming language are you using?

You would have two different modes, mode=0 and mode=1. When you hit the touch led your program will switch the mode. That would look like:

if touch led is pressed
if mode=0
mode=1
else
mode=0
Wait 1 sec // So it doesn’t change back and forth 20 times while your finger is touching the touch led.

Your controls will look like:

if mode=1
Tank Control
else
Arcade Control

You will probably want to set the color of the touch led based on the mode as well.

Try it out and post what you came up with!