the thing that should be focused on is keycard into the unlock the door system to control motor operation for letting curtain to open/close automatically from getting sunlight. Meanwhile, when LDR is getting light, motor should rotate forward while it would rotate reverse when LDR is not getting light.