How to delay until a next increment of time occurs ?
R.Wieser
address at not.available
Sat Nov 16 02:12:22 EST 2019
Dietmar,
> I would assume that this is not an application that needs to output a 100%
> correct pulse train every time.
Correct. Thats in the design of the pulses themselves (25% duticycle for
one state, 75% for the other. Lots of leeway, and self synchronising)
> You may just repeat the pattern ten times to be safe enough.
:-) I was already doing exactly that.
> Combine it with a light sensor for feedback ;-)
Well ... I see a few problems with that. Some when I would keep the light
sensor next to the Pi, and others when I place it next to the lamp. :-p
> Btw. you may want to increase the priority of your task.
...
> os.system( "sudo renice -15 -p %d"%os.getpid() )
Thanks. That should help the reduce the jitter.
> Anyway, Micropython on a microcontroller would probably be the best
> solution.
My language of choice would probably be Assembly, but yes. An (atmel)
attiny16 (8 pin, 5 free to use) should be enough for it.
But .... first experiment the heck outof the Pi to see how well it can do on
its own. :-)
Regards,
Rudy Wieser
More information about the Python-list
mailing list