Implementing a multivibrator function with python

unknown unknown at unknown.com
Tue Nov 12 17:04:50 CET 2013


On Tue, 12 Nov 2013 06:44:05 -0800, JL wrote:

> I am actually running python on raspberry pi. The trigger event is a
> button-press.
> 
> On Monday, November 11, 2013 6:56:03 PM UTC+8, Dave Angel wrote:
>> On Mon, 11 Nov 2013 01:41:58 -0800 (PST), JL <lightaiyee at gmail.com>
>> 
>> wrote:
>> 
>> > - If the event happens again before the 5secs expire, the high
>> 
>> duration will be extended by another 5 secs. This works like a
>> 
>> retriggerable multivibrator for those who are into electronics.
>> 
>> 
>> 
>> More precisely a retriggerable monostable multivibrator.
>> 
>> 
>> 
>> The question makes little sense unless you're running in an event
>> 
>> driven environment, such as a gui. Name the environment and somebody
>> 
>> can probably help.
>> 
>> 
>> 
>> --
>> 
>> DaveA

How critical is the output pulse time?
is it a state that can be polled to regularly & changed if the timeout 
has been exceeded or does it need to switch in the background?

if you need to trigger & switch in the background you will probably need 
to start playing with threads or multiprocessing.

greater detail on what you are trying to achieve project wise may assist 
here



More information about the Python-list mailing list