PIR sensor not working
The HC SR501 PIR module uses a BIS00001 PIR sensor IC. It has an active high output. When no motion is sensed, the output is pulled low, when motion is sensed, it's pulled high, through R14.



It is not active low, or open collector, unlike the SE-10 that the MBED Pir "Hello World" project is based on. You have a pull up enabled. Try disabling that to get it to work.

The SE-10 basically does the same, but has a NPN transistor at the IC's output, which inverts the logic at the Output pin. That does need the pull-up.