Ich mache das mit JAVA!
Ungefähr so:
mitCode:import javax.comm.*; ... serialPort=open("COM1"); serialPort.setSerialPortParams(2400, SerialPort.DATABITS_8,SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); outputStream = serialPort.getOutputStream(); ... outputStream.write(char); ...
Code:SerialPort open(String name) throws PortInUseException { CommPortIdentifier portId; Enumeration portList; portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals(name)) { return (SerialPort) portId.open(name, 2000); } } } return null; }
Tut's









Lesezeichen