int val = analogRead(sensePin);
if (val == 538) {
Analogue values wobble notoriously; don't use equality comparisons like this.
The rest of your code is too long to read, and get rid of the delays. (Google: arrays)
int val = analogRead(sensePin);
if (val == 538) {
Analogue values wobble notoriously; don't use equality comparisons like this.
The rest of your code is too long to read, and get rid of the delays. (Google: arrays)