use of com.robo4j.hw.rpi.serial.gps.GPSListener in project robo4j by Robo4J.
the class GPSTest method main.
public static void main(String[] args) throws InterruptedException, IOException {
GPS gps = new GPS();
gps.addListener(new GPSListener() {
@Override
public void onEvent(PositionEvent event) {
System.out.println(event);
}
@Override
public void onEvent(VelocityEvent event) {
System.out.println(event);
}
});
gps.startAutoUpdate();
System.out.println("Press enter to quit!");
System.in.read();
gps.shutdown();
}
Aggregations