import com.LabJack.LabJackJNI; import com.LabJack.LabJackWrapper; import com.LabJack.LabJackException; /** * This program show how to read the TTL digital inputs (DB-25) * using com.LabJack.LabJackWrapper.digitalIn(). */ public class DigitalIn { public static void main( String args[] ) { LabJackWrapper lj = new LabJackWrapper( -1 ); try { // display the TTL value on all 16 digital inputs. for( int idx = 0; idx < 16; idx++ ) { System.out.println( lj.digitalIn( idx ) ); } } catch( LabJackException ex ) { ex.printStackTrace(); } } }