So, it looks something like this:
1,481 (on for 481 microsecs)
0,2894 (off for 2894 microsecs)
1,425 (you get the gist)
etc.
I'm using pigpio to set the output high or low, and then sleep to wait. I didn't expect it to work because I'd read that time.sleep has no chance of being accurate., and I wasn't wrong

I'm currently doing this:
Code: Select all
for sig in signal_arr:
pi.write(gpioWrite,sig.sigLevel)
time.sleep(sig.sigLengthSeconds);
Is there an alternative to time.sleep which is more reliable, or a way with pigpio to send it a list of states/lengths?