Rock Paper Scissors

if (ledpin == HIGH && compLed3 == HIGH || ledPin2 == HIGH && compLed == HIGH || ledPin3 == HIGH && compLed2 == HIGH)
{

digitalWrite(ledRed,LOW);
digitalWrite(ledGreen,HIGH);
digitalWrite(ledBlue,LOW);

delay(5000);
}

I am currently trying to get my code to make a decision on who won the round of rock paper scissors based on the color of the RGB. I am not encountering any errors yet the rgb is not responding whatsoever.

Rock_Paper_Scissors.ino (2.54 KB)

int ledpin = 5;
int compLed3 = 10;

if (ledpin == HIGH && compLed3 == HIGH || ledPin2 == HIGH && compLed == HIGH || ledPin3 == HIGH && compLed2 == HIGH)

It does not look like 5 is 1 and 10 is 1, so the first part will be false. So will the second part and the third part, since none of the pin numbers are 1.

Somewhere, you need to read (or remember) the state of pin, and compare the pin STATE to HIGH or LOW, not the pin NUMBER.

@anchovie15, are you a colleague of @Mattinator2dot0 who started this Thread

If so why not combine your resources and click Report to Moderator and ask to have the two Threads merged?

...R