High precision sleep/delay in python (without interruption)

566 views Asked by At

I need to do some operations on Raspberry Pi3 pins in specific time. For example I send some bytes via uart then I need to wait about 5ms and again send next part of bytes, but I noticed that if I do time.sleep(0.005) or for example wiringpi.delay(5) from time to time this sleep/delay has some kind of interruption and it doesn't takes 5ms but for example 10ms. All this is irregular and I doesn't know how to catch this problem. Some ideas how to made that always 5ms ?

0

There are 0 answers