I've got a circuit motor which has one end attached to a wire, and the other end is attached to another wire cut in half with a resistor in between the two ends. I've carefully calibrated what resistor to use so that my motor, which works best with around 1.5V, can be supplied by GPIO's 3.3V output when connected to one currently loose end. The other end will be grounded. When I place a 1.5V battery to complete the circuit, the wheel spins (slower than at top performance, since I've placed a resistor to cut down the voltage given to the motor). However, when I finish the circuit off with the GPIO, nothing happens. I doubt my GPIO isn't working properly, since I've already connected it to an LED in a breadboard and made the light flash.
Here's the code that I'm using:
from RPi import GPIO
import time
def __main__():
GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.OUT)
GPIO.output(4, True)
print "Voltage On"
raw_input()
GPIO.output(4, False)
if __name__=="__main__":
__main__()
I have the GPIO end connected to GPIO4, as in this diagram. What could be wrong with my circuit?