Capacitance: Toggle Brightness

Some code for toggling the brightness of an LED using the Arduino capacitance touch library. For further information about using capacitance sensing with the Arduino see this related post. If you want more states, change the variable states (line 9) to a higher number and add additional if statements.