GolamMostafa:
ask questions.
Ok, I'm game; note I'm not OP though. What difference does it make to ask if 250 < lightlevel or lightlevel > 250. Run the code below and see what happens.
//https://forum.arduino.cc/index.php?topic=544754
//1 may 2018
int lightlevel = 300;
void setup()
{
Serial.begin(9600);
Serial.println("start");
if (250 < lightlevel ) Serial.println("250<lightlevel");
if (lightlevel > 250) Serial.println("lightlevel>250");
Serial.println("done");
}
void loop()
{
}
Both tests pass.
I think it makes more sense to ask it this way though "lightlevel>250", since that's probably how we would pose the question in speech. But the sketch doesn't seem to care; arithmetically and logically it's the same thing.