Digital pins and grounds

fungus:
Don't use digital pins as grounds. Sending current through a transistor is NOT the same as connecting it to ground (it's more like sending it through a resistor).

You should qualify that with "Sending current through a MOSFET transistor...", as a BJT is more like a diode than a resistor.