Alright, so after all to long and help from many forum members I have this sketch working, however I have encountered something weird.
First, here is the LED portion of the sketch.
void loop()
{
long total1 = cs_1_2.capacitiveSensor(30);
if (total1 > 500) {
counter = counter +1;
delay(5000);
}
if (counter == 1) {
digitalWrite(led1, LOW);
}
else {
digitalWrite(led1, HIGH);
}
if (counter == 2) {
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
}
else {
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
}
}
As you can see, I have the first LED set to turn on when the counter is 1, and that works, but it is very very dim. If I make the counter hit 2, both LED's light up at full brightness.
I have tried other LEDs, and adding a loop that did nothing if the counter was 0 but that did not help, so, what is the cause of this?
Also, I do have both LED's pins set as output.