Just be careful to take note of the pin order.
- Max Voltage: 60V
- Max Current (peak): 8A
- Max Current (constant): 6A
- Please note that these can get really hot if you are trying to switch a lot of current. You might need a heat sink.
- Look into MOSFET transistors if you need to drive lots of current, they are more efficient and don’t heat up so much.
Control Motor Speed With Arduino and Transistor
For a small motor you could use either of the transistors (PN2222 or TIP120). The TIP120 is just going to be able to handle more current.