Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59076

Re: Implementing a multivibrator function with python

Date 2013-11-11 15:00 +0100
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
Subject Re: Implementing a multivibrator function with python
References <c763cc2a-83d2-4ed7-9df6-83371e83d841@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.2378.1384178523.18130.python-list@python.org> (permalink)

Show all headers | View raw


Op 11-11-13 10:41, JL schreef:
> I am trying to implement a multivibrator function with python. This is how it works; 
> 
> - An trigger event happens
> - Upon receiving the event, a variable goes high for 5secs, then go low.
> - 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. 
> 
> Is there some sample code for this problem or can someone point me to using the right library for this feature?
> 
> Thank you very much.
> 
The problem is that it depnds on the kind of trigger event. Is it a signal?
Is it a character that arrives through a pipe or socket?

I would take a look at the signal module and see if it can get you started.

-- 
Antoon Pardon

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Implementing a multivibrator function with python JL <lightaiyee@gmail.com> - 2013-11-11 01:41 -0800
  Re: Implementing a multivibrator function with python Dave Angel <davea@davea.name> - 2013-11-11 04:56 -0600
    Re: Implementing a multivibrator function with python JL <lightaiyee@gmail.com> - 2013-11-12 06:44 -0800
      Re: Implementing a multivibrator function with python unknown <unknown@unknown.com> - 2013-11-12 16:04 +0000
      Re: Implementing a multivibrator function with python Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-12 17:37 +0100
      Re: Implementing a multivibrator function with python Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-12 11:47 -0500
      Re: Implementing a multivibrator function with python Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-11-12 19:42 -0500
  Re: Implementing a multivibrator function with python Terry Reedy <tjreedy@udel.edu> - 2013-11-11 05:58 -0500
  Re: Implementing a multivibrator function with python Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-11 15:00 +0100

csiph-web