Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Reads a pulse from a pin

inputs:
   pin: pin number for pulse measurement
returns:
   duration : pulse length measurement

src/p/y/Python-Arduino-Command-API-HEAD/examples.py   Python-Arduino-Command-API(Download)
    pingPin = pw_pin
    while True:
        duration = board.pulseIn(pingPin, "HIGH")
        inches = duration / 72. / 2.
        # cent = duration / 29. / 2.