Hi, well its been a long while since i have done programming or electronics but loving playing with my uno!
I wanted to create a simple circuit that keeps power on to the Arduino until a digital pin goes low. so this what i was trying.
press switch supplies power to the UNO. the UNO boots up and raise D6 out pin HIGH, this is connected to the base of the 2n2222 via a 1K resistor.
the 2N2222 maintains the power when the switch is released until in code the Pin connected to the base is lowered.
Arduino is powered via 9V battery on VIN.
I can use the 2N2222 to switch an LED on and off, but it is controlling the uno its on all the time. the 2N2222 i believe is rated at 30V 800mA so should not be breaking down.
So not sure what i'm doing wrong!
Sorry for the lack of a circuit diagram I have not found what you all use to do them yet!