forked from GideonLeGrange/panstamp-java
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.java
More file actions
Latest commit
27 lines (20 loc) · 630 Bytes
/
Copy pathExample.java
File metadata and controls
27 lines (20 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
packageexample;
importme.legrange.panstamp.Network;
importme.legrange.panstamp.NetworkException;
/**
*
* @author gideon
*/
publicabstractclassExample {
privatestaticfinalStringPORT = "/dev/tty.usbserial-A800HNMV";
privatestaticfinalintBAUD = 38400;
protectedNetworknw;
protectedabstractvoiddoExampleCode(Networknw) throwsNetworkException;
protectedvoidrun() throwsNetworkException, InterruptedException {
nw = Network.openSerial(PORT, BAUD);
doExampleCode(nw);
Thread.sleep(100000);
nw.close();
System.exit(0);
}
}