Example of how an Attiny project can be powered up with a push button, and keep on until the program decides to power off with one pin.

Example of how an Attiny project can be powered up with a push button, and keep on until the program decides to power off. The same push button can be used as an input to the program when powered on and it only uses one pin for that all.

 

Two leds have been added as example but they are not necessary for the power on/off, input button, etc.

 

Red LED signals power on while white LED is sofware controlled. In the example if shows if the button is pressed and bliks before sofware controlled powe off.