How do I make a toggleable Infrared motion detection module
Consider using a state machine with 4 states.  Currently you only have 2 states.  One where "bool1" is TRUE and another when "bool1" is FALSE.  The 4 states needed are: 


When the LED is OFF &amp; the PIR is NOT-ACTIVE. 
When the LED is OFF &amp; the PIR is ACTIVE. 
When the LED is ON and the PIR is ACTIVE. 
When the LED is ON and the PIR is NOT-ACTIVE.


As you travel between these 4 states, you will find you only want to turn the LED ON when traveling between states 2 &amp; 3.  And you will only want to turn the LED OFF when traveling between states 4 &amp; 1.