Timer Alarm settings



  • I don't understand the syntax for creating an alarm object: class Timer.Alarm(handler=None, s, *, ms, us, arg=None, periodic=False)

    usage example is given as:
    Timer.Alarm(self._seconds_handler, 1, periodic=True)

    This example works but that only gives a single integer numeric parameter (which seems to achieve 1 second), please can we have an example of something else, say 150mS periodic alarm?



  • Thanks - so much clearer now.



  • @robotmad, sure, it would be:

    Timer.Alarm(self._seconds_handler, ms=150, periodic=True)
    

Log in to reply
 

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.