PIR -Sensor

I must be something wrong!

Yes. That code does something. You expect it to do something. What you want it to do is pretty clear. What it actually does is not.