Do you want your transistors to reliably switch or not? How did you come up with 10K?
WHY? Without going deep into concepts like transistor minimum gain, saturation and reading a datasheet (eek)... know this. A transistor (not a mosfet) base pin needs only a very small voltage to work, but to switch full on it needs a certain amount of current. A 10K resistor limits current from the arduino pin to a point that is so close to where the 2N2222 comes out of it's full-on switching state ( That's called saturation and is is a point where no additional base current will make the transistor switch any more "on" ) that your results may be unpredictable since your transistor may not actually be fully ON. This is not what a switch circuit is aiming for.
Using a 1K value base resistor with a 2N2222 and 5 volt digital logic for switching circuits goes back to qualified engineers in the late 1960's right up until today. (You see physics doesn't change much) Do you really want to doubt the wisdom of 50 years of engineering? :-)