2N3906 transistor not gate

Hello I need an inverter/ not gate for my project. But I want to build it.
If I need a transistor I only have a 2N3906 PNP and a 2N3904 NPN.
thanks,
Clay

What are you feeding it from?
Anyway for the NPN, input to a 1K resistor, to base. Emitter to ground, collector to a 10 K resistor to +5V. Take the output from the collector.

Could you please send me a sketch I have no clue what you mean!
Thanks

This page has a lot of good basic info, see especially "Using a transistor as a switch",

http://www.kpsec.freeuk.com/trancirc.htm

Or, scroll all the way down to "A transistor inverter (NOT gate)"

the problem is im using a 3v battery with a minumum 3v motor, if there is any resistance bewtween the battery and the motor it won't work, so maybe I should change the circuit???

if there is any resistance bewtween the battery and the motor it won't work

You are out of luck then, until you can find switches built on super-conductors.

the motor is 1 ohm

The motor's dc resistance doesn't matter. If it is as you stated earlier that the motor doesn't work if there is any resistance, there is no solution to your problem. It is a theoretical and practical impossibility.

Uh-oh, if the motor measures 1 ohm at DC, and uses a 3V battery, then the startup
current will be close to 3A, no? Not a good combination with a 2N3906.

i_luv_arduino:
Could you please send me a sketch I have no clue what you mean!
Thanks

Now we know you are talking about driving a motor instead of what you first asked about I can be more specific:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

if there is any resistance bewtween the battery and the motor it won't work,

That is just a nonsense statement, it is not true.

What I want to do is I have a car with a motor driving 2 gears and then to an axle.
In the front I have one wire with another behind so if it hits anything they touch, and if I can figure this out one would be connected to 3v+ the other to a not gate input, the output of the not gate goes to one pin on the motor the other pin on the motor goes to gnd
so is it impossible???

How about having the bumper Open the wires, so when the bumper hits it stops the current flow to stop the motor?

Is there an arduino in the picture? It can read the state of the bumper switch and then control the motors for you.
Then once you hit the wall, the arduino can have the motor just stop, and not keep bumping into the wall over and over and over each time it bounces off the wall and changes the bumper switch state.