Make your code more readable by instead of doing, for example, something like this:
//Switch input pin
pinMode(6, INPUT);
Do this:
pinMode(switchA, INPUT);
Then post the entire code
Make your code more readable by instead of doing, for example, something like this:
//Switch input pin
pinMode(6, INPUT);
Do this:
pinMode(switchA, INPUT);
Then post the entire code