.. module:: dlh ********** DLH Module ********** .. _datasheet: http://www.allsensors.com/cad/DS-0355_Rev_B.PDF This module contains the Zerynth driver for Amphenol DLH pressure sensors series. These calibrated and compensated sensors provide accurate, stable output over a wide temperature range. This series is intended for use with non-corrosive, non-ionic working fluids such as air, dry gases and the like. The driver implements SPI communication. =============== DLH Class =============== .. class:: DLH(spidrv, cs, d_or_g, clock=2000000) Creates an intance of the DLH class. :param spidrv: SPI Bus used '( SPI0, ... )' :param cs: GPIO to be used as Carrier Select :param d_or_g: specifies DLH type D (differential) or G (absolute) sensor. can be one of :samp:`TYPE_D` or :samp:`TYPE_G` constants :param clock: spi clock to be used Temperature and pressure values can be easily obtained from the sensor: :: from amphenol.dlh import dlh ... d = dlh.DLH(SPI0, D10, dlh.TYPE_D) press, temp = d.get_values(unit=dlh.UNIT_PASCAL) .. method:: get_values(mode=MODE_SINGLE, unit=UNIT_INH20) Return a 2-element tuple containing current pressure and temperature values. The acquisition mode can be specified with one of: * :samp:`MODE_SINGLE` * :samp:`MODE_AVG2` * :samp:`MODE_AVG4` * :samp:`MODE_AVG8` * :samp:`MODE_AVG16` The unit of measure of pressure can be specified in: * :samp:`UNIT_INH20` * :samp:`UNIT_CMH20` * :samp:`UNIT_PASCAL`