reverse forward & speed control of dc motor using 2n2222a, potentio and arduino?

please help me with this. thanks. i need this for school

patchie: please help me

Help you with what? You should be more clever about this, at least making a half-hearted attempt at convincing others that you've tried something and need clarification with regard to something or other.

Speed control wouldn't be too dificult but if you need direction control too, you may have problems. To achieve this you would need a H bridge configuration.

Usually a H bridge would have 2 NPN and 2 PNP transistors. Using just NPN transistors is far from ideal.

Hint: Google for NPN-only H-bridge

Note: If you accidentally turn on both sets of transistors at the same time your transistors will fry very quickly.