def __init__(self, data_pin, clk_pin, cs_pin, vref=3.3):
    self._data = data_pin
    self._clk = clk_pin
    self._cs = cs_pin
    pinMode(self._data, INPUT)
    for i in (self._cs, self._clk): pinMode(i, OUTPUT)

    # Idle state for clock and cs (data doesn't matter):
    for i in (self._cs, self._clk): digitalWrite(i, HIGH)
    
    # Calculate volts per bit:
    self.dv = float(vref)/2**self.n_bits
dataset/ETHPy150Open graycatlabs/PyBBIO/bbio/libraries/ADS786x/ads786x.py/ADS786x.__init__/original