Using NPN transistor as a switch

The schematic for the circuit.

Using Arduino Uno, 12v led strip, 9v battery and 2N3904 transistor, with some simple code to control on/off.

schematics and calculations to ensure current and power is within transistor specifications. Using Kirchhoff Current Law, IE = IB + IC .

And a short clip for the setup.

Arduino sketch for the blinking LED strip, the serial monitor showing 1 when transistor is saturated(ON) and 0 when transistor is cut-off (OFF).