Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
private static IOPortAccess ioPort = new IOPortAccess();
public static void druckeZeichen(char zeichen) throws Exception{
ioPort.openDriver();
long endtime = System.currentTimeMillis() + 3000;
// 1. warte bis Drucker bereit
do {
if (System.currentTimeMillis() > endtime)
throw new Exception("Timeout");
} while ((ioPort.readPort(0x379) & 0x80) != 0x80);
// 2. Zeichen auf Datenleitungen schreiben
ioPort.writePort(0x378, zeichen);
// 3. Data-Strobe auf 0 setzen
ioPort.writePort(0x37A, ioPort.readPort(0x37A) & 0xFE);
Thread.sleep(5);
// 4. Data-Strobe wieder auf 1 setzen
ioPort.writePort(0x37A, ioPort.readPort(0x37A) | 0x01);
}
Original von ink3n
brain fuck... wer hat plan?,will von der parralelen schnittstelle lp0 high/low von der strobe leitung einlesen....