def eAnalogIn(self, channel, idNum = None, demo=0, gain=0):
        """
        Name: U12.eAnalogIn(channel, idNum = None, demo=0, gain=0)
        Args: See section 4.1 of the User's Guide
        Desc: This is a simplified version of AISample. Reads the voltage from 1 analog input

        >>> import u12
        >>> d = u12.U12()
        >>> d.eAnalogIn(0)
        {'overVoltage': 0, 'idnum': 1, 'voltage': 1.435546875}
        """
        if idNum is None:
            idNum = self.id
        
        if ON_WINDOWS:
            ljid = ctypes.c_long(idNum)
            ad0 = ctypes.c_long(999)
            ad1 = ctypes.c_float(999)
    
            ecode = staticLib.EAnalogIn(ctypes.byref(ljid), demo, channel, gain, ctypes.byref(ad0), ctypes.byref(ad1))
    
            if ecode != 0: raise U12Exception(ecode)
    
            return {"idnum":ljid.value, "overVoltage":ad0.value, "voltage":ad1.value}
        else:
            # Bits 6-4: PGA for 1st Channel
            # Bits 3-0: MUX command for 1st Channel
            channel0PGAMUX = ( ( gain & 7 ) << 4)
            channel0PGAMUX += channel-8 if channel > 7 else channel+8

            results = self.rawAISample(channel0PGAMUX = channel0PGAMUX)
            
            return {"idnum" : self.id, "overVoltage" : int(results['PGAOvervoltage']), 'voltage' : results['Channel0']}
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.eAnalogIn/original