Ultrasonic sensor

1. Construction method ultrasonic(gpiohs)

1.1. Parameters

  • gpiohs: gpiohs number, you need to register the pin withfm first, for example ```python from fpioa_manager import * from modules import ultrasonic

fm.register (board_info.D [6], fm.fpioa.GPIOHS0, force = True) device = ultrasonic (fm.fpioa.GPIOHS0) ```

1.2. return value

Return object

2. method measure(unit, timeout)

2.1. Parameters

  • unit: unit, take the value in the following constants
  • timeout: timeout time in microseconds (us)

3. Constant

3.1. ultrasonic.UNIT_CM

Unit of distance returned, cm

3.2. ultrasonic.UNIT_INCH

Units of distance returned, feet

powered by GitbookFile Modify: 2021-02-03 10:26:57

results matching ""

    No results matching ""