This may seem like a stupid question but I really cant get my head around it.
I have two seperate python codes
motor.py:
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(26,GPIO.OUT)
print "LED on"
GPIO.output(26,GPIO.HIGH)
time.sleep(5)
print "LED off"
GPIO.output(26,GPIO.LOW)
GPIO.cleanup()
motor2.py
Code: Select all
from gpiozero import LED
from time import sleep
led = LED(26)
while True:
led.on()
sleep(3)
led.off()
sleep(3)
When I run motor2.py I can measure the voltage changing from 0 to 3.3v between GPIO26 and GND. If I measure the resistance between GPIO26 and gorund its a 35ohms when the GPIO is High.
Now the reason I ask is Im trying to drive a L298N motor driver. motor.py does not work to drive the motor. motor2.py does work to drive the motor.
Why does motor2.py create some continuity while motor.py does not???