forked from GideonLeGrange/panstamp-java
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenSerial.java
More file actions
Latest commit
20 lines (15 loc) · 468 Bytes
/
Copy pathOpenSerial.java
File metadata and controls
20 lines (15 loc) · 468 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
packageexample;
importme.legrange.panstamp.Network;
/**
* Simple example: Open a gateway for a serial connected network.
* @since 1.0
* @author Gideon le Grange https://github.com/GideonLeGrange
*/
publicclassOpenSerial {
publicstaticvoidmain(String...args) throwsException {
Networknw = Network.openSerial("/dev/ttyUSB0", 38400);
// Do things with the network
// close when done
nw.close();
}
}