I would really use digitalout instead of PWM. Also because I dont think 255 is always high for PWM. Well the result may be it, but normally it is a float between 0.0 and 1.0.
Regarding your mbed setup, when I use an mbed on an experiment print I put it on those headerpins you have now besides it, then you can remove it again if you want to.
You say 5 seconds after '255' is submitted, it shuts down again. Did you test what happens when you connect NPN to ground, and are you sure it is 5 seconds after '255' is set as PWM out? So then it should do the first 5 seconds do nothing, then boot, then 5 seconds nothing, then shut down. It would make alot more sense already if it immediatly boots, then 5 seconds nothing, then shut down. The issue could then possibly be that during time mbed needs to start the pins are high (due to pull ups).
Trying to boot my pc up with a pwm signal
Here is the code
Any idea why this wont work? It worked once or twice but not anymore, i can still boot the pc up if i tap the pins together and shut the pc down if i hold them together for 5 seconds.. Anyone out there with any knowledge as to why this does not wanna boot the pc?