Issue
I wanted to send electricity through a GPIO Pin (Raspberry Pi Pico) to power a small Motor (Just for fun) but the Programming doesn't work.
The Code:
import machine
import utime
motor = machine.Pin(7, machine.Pin.OUT)
print("init")
while True:
print(motor.high())
But on the motor.high()
its only prints None
same with motor.value(1)
or motor.on()
. And I am not getting an Error in the console
I'm not the best with electricity so maybe it isn't the programming part, all I do is hold the wires of the motor against the connections of the Pico. But if i put i non Ground wire aigains the always running 3V Volt "Pin" the motors spins.
I am using a Pico with MicroPython v1.19.1
and the IDE is Thonny
Solution
the rpi pico doesn't have enough power through gpio to run a motor on its own
neither
motor.high()
motor.value(1)
normoter.on()
return a valueto make this work you need to connect a transistor to switch the power on and off
Answered By - blankettripod Answer Checked By - Willingham (WPSolving Volunteer)