I have standard 2n2222 transistors. I already know how to hook them up with the arduino but I am trying to make a H-bridge. in the tutorials it shows the transistor giving ground out. To my knowledge you need 2 transistors giving out the voltage and not the ground to make a H-bridge. when I attach the +5 wire to the transistor were I usually put the ground it gets hot. what am I doing wrong
For high-side switching (transistor between +V and load) you have to use a PNP (2N2907) transistor.
Go here and take your pick,
A 2N2222 is not really a power transistor, and you're not gonna realistically be able to drive more than
maybe 50-mA or so.
thank you guys I didn't understand I needed NPN and PNP.
now I know.