import java.io.*;
import java.util.*;
import gnu.io.*;

public class KT88_BioEra_Test {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		

		// find COM port
		System.out.println("Available ports:");
		for(String port : KT88.GetSerialPorts()){
			System.out.println("\t"+port);
		}
		
		KT88 kt88 = new KT88("COM3");
		
		kt88.OpenDevice();
		
		for(int j=0; j<10; j++)
		{
			int[] data = kt88.ReadPacket();
			for(int i=0; i<16; i++)
				System.out.print(data[i]+"\t");
			System.out.print("\n");
		}
		 
		kt88.CloseDevice();
		
		
		
		System.out.println("end of execution");
	}

}
