Changed license to Creative Commons Zero (CC0).
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / io / Connexion3D.java
1 /*
2  * Sixth 3D engine. Author: Svjatoslav Agejenko. 
3  * This project is released under Creative Commons Zero (CC0) license.
4  *
5 *
6  */
7
8 package eu.svjatoslav.sixth.e3d.io;
9
10 import java.io.BufferedReader;
11 import java.io.FileReader;
12 import java.io.IOException;
13
14 /**
15  * 3D Connexion mouse adapter.
16  * <p>
17  * Idea is to read Linux device file and interpret resulting numbers.
18  * <p>
19  * TODO: unfinished
20  */
21
22 public class Connexion3D {
23
24     public static void main(final String[] args) throws IOException {
25
26         final BufferedReader in = new BufferedReader(new FileReader(
27                 "/dev/hidraw4"));
28
29
30         while (true) {
31             System.out.print(in.read() + " ");
32             System.out.println("\n");
33         }
34
35         // in.close();
36
37     }
38 }