Daisuke, your IF statements are not quite right. The "=" sign is for assigning a value while the "==" is for testing a value. So your IF statements should read:
Thanks @bko@peekay123
Thanks, I have not written C. I have forgot the basic of it.
Btw, I have turned off the light in the room, but still serial says “0 is on” and “0 is off”,
What is wrong? Can the module detects a light is bright or not, right?
There are two trim potentiometers on that board that can be adjusted to your exact lighting situation. Have you tried adjusting them to see if there is a setting that works better for you?
@bko
Yes, there is 2 trim potentiometers. And 3 LEDs near it.
How should I adjust it? When room light turns on, should left(开关1) and right(开关2) LED turns on or off?