Commit | Line | Data |
---|---|---|
03b67a73 TW |
1 | package kaka.cakelight; |
2 | ||
01ee91e7 TW |
3 | import com.pi4j.io.spi.SpiChannel; |
4 | import com.pi4j.io.spi.SpiDevice; | |
5 | import com.pi4j.io.spi.SpiFactory; | |
6 | ||
7 | import java.io.IOException; | |
8 | ||
d182b8cc | 9 | public class LedController { |
01ee91e7 TW |
10 | public static void main(String args[]) { |
11 | new LedController(null); | |
12 | } | |
13 | ||
14 | public LedController(Configuration config) { | |
15 | try { | |
16 | SpiDevice spi = SpiFactory.getInstance(SpiChannel.CS0); | |
17 | spi.write( | |
18 | (byte)0xff, (byte)0x0, (byte)0x0, | |
19 | (byte)0x00, (byte)0xff, (byte)0x0, | |
20 | (byte)0x0, (byte)0x00, (byte)0xff | |
21 | ); | |
22 | } catch (IOException e) { | |
23 | e.printStackTrace(); | |
24 | } | |
25 | } | |
26 | ||
d182b8cc | 27 | public void onFrame(LedFrame ledFrame) { |
03b67a73 TW |
28 | // TODO |
29 | } | |
30 | } |