I am trying to run an old Raspberry Pi 2011.12 as a server to control a RGB LED strip. To this I am using PIGPIO since this is the best solution (RPi.GPIO is software based, which creates flickering). However I have problems with a small delay, when trying to run the python script.
My code is as follows:
#!/usr/bin/env python import time, sys, random import pigpio pi = pigpio.pi() # connect to local Pi redcolor = 0 bluecolor = 0 greencolor = 0 pi.set_PWM_dutycycle(23, redcolor) pi.set_PWM_dutycycle(24, greencolor) pi.set_PWM_dutycycle(22, bluecolor) pi.stop()
I have not tried to run the script on a new Raspberry Pi yet since I hope that somebody here could tell me if the delay sounds normal or if there is a way to reduce it. We are talking about approximately 2 seconds before the PWM signal turns on and light up the RGB LED strip.
I am running on Raspbian Buster (the newest version).