org.hwo.pulscounter/src/org/hwo/pulscounter/PulsCounterInterface.java

38 lines
528 B
Java
Raw Normal View History

2014-01-24 11:41:56 +01:00
package org.hwo.pulscounter;
import java.io.RandomAccessFile;
import java.util.ArrayList;
import java.util.List;
import org.hwo.io.SerialPort;
public class PulsCounterInterface {
SerialPort port;
public PulsCounterInterface(String portName)
{
port = new SerialPort(portName);
}
public List<Integer> readCounter()
{
ArrayList<Integer> counter = new ArrayList<Integer>();
/*
if (port.open())
{
port.close();
}
*/
for (int i=0;i<32;i++)
counter.add( i * i);
return counter;
}
}