I have a White LED Strip and i wanna dim it with RPi.
So this is my circuit(the wires are on other pins, and i have multimeter connected right now) .
Dual H Bridge DC Stepper Motor Drive Controller Board Module Arduino L298N HG
Theory is that i should with pwm control output, but only output which i'm getting is like +/-0.0001V
my code is
Code: Select all
import wiringpi import time wiringpi.wiringPiSetupGpio() wiringpi.pinMode(18, 2) wiringpi.pwmWrite(18, 0) value = 0 increment = 4 increasing = True count = 0 while count < 100000: wiringpi.pwmWrite(18, value) if increasing: value += increment time.sleep(0.002) else: value -= increment time.sleep(0.002) if (value >=1024): increasing = False if (value <= 0): increasing = True time.sleep(0.002) count = count + 1