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?

asked May 13, 2016 at 14:02

1 Answer 1

1

You run multiple checks. For example:

if (currentLedColor[0] == currentLedColor[1] && currentLedColor[0] == currentLedColor[2]) {
 // do something
}
answered May 13, 2016 at 14:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.