I connected my LED strip as per this discussion and it's working fine, except that the light is really low even if I set the cuty cycle to max (100). It's really less than half of the bright than it should be. What could be the issue?
here's the code I'm using
Code: Select all
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(37, GPIO.OUT)
p = GPIO.PWM(37, 100)
p.start(0)
try:
while 1:
#p.ChangeDutyCycle(100)
for dc in range(0, 101, 5):
p.ChangeDutyCycle(dc)
time.sleep(0.1)
for dc in range(100, -1, -5):
p.ChangeDutyCycle(dc)
time.sleep(0.1)
except KeyboardInterrupt:
pass
p.stop()
GPIO.cleanup()