Description
Compare the value on the left side of the operator with the value on the right side of the operator. When the two operands are equal, return true.
Syntax
x == y;
//this returns true when x is equal to y.
Example Code
val = digitalRead (pin_number); // let val = HIGH or LOW
if (val == HIGH) // When the val is equal to HIGH
{
digitalWrite (13, LOW); //Turn off the built-in LED
}