0

I'm setting a series of variables with: uint32_t currentLedColor[9]

What I'd like to check is if certain ones of those are the same.

Basically want to say if currentLedColor[0] and currentLedColor[1] and currentLedColor[2] are equal

How would I write that?

1

You run multiple checks. For example:

if (currentLedColor[0] == currentLedColor[1] && currentLedColor[0] == currentLedColor[2]) {
    // do something
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.