0

I'm new to the raspberry pi community and need to power a 1v motor however, I can not figure out how to output such power

Here is all of,my code if you need it

import time
led=Pin(25,Pin.OUT)
Motor=Pin(15,Pin.OUT)
print("working!")
for i in range (3):
    Motor.value(1)
    led.value(1)
    time.sleep(0.5)
    Motor.value(0)
    led.value(0)
    time.sleep(1)
    
Motor.value(0)
led.value(0)
  • 1
    motor*, not moto, sorry abt that – Arjinoodles Aug 05 '21 at 03:18
  • 2
    The GPIO pins on a Raspberry Pi or similar board are adequate for lighting a LED. They are completely inadequate for powering a motor; you will need additional circuitry involving a transistor or relay, to control power coming from a separate source (which might be the same power supply that runs the Pi, or might be entirely separate). – jasonharper Aug 05 '21 at 19:31
  • 1
    The GPIO pins are digital, either 3v or 0v. If you need an adjustable voltage, you'll need to use one of the DAC pins and control the voltage yourself. Pay attention to @jasonharper; you probably can't source enough current to drive a motor. – Tim Roberts Aug 05 '21 at 19:32
  • 1
    oh, Thanks. Is there a way that I can create any on and off system with an external power source? – Arjinoodles Aug 05 '21 at 20:28
  • 1
    I tried this and found it good: https://www.tomshardware.com/how-to/dc-motors-raspberry-pi-pico. – tlfong01 Aug 09 '21 at 11:28

0 Answers0