Added a custom Color class
[kaka/cakelight.git] / src / kaka / cakelight / LedController.java
CommitLineData
03b67a73
TW
1package kaka.cakelight;
2
01ee91e7
TW
3import com.pi4j.io.spi.SpiChannel;
4import com.pi4j.io.spi.SpiDevice;
5import com.pi4j.io.spi.SpiFactory;
6
7import java.io.IOException;
8
d182b8cc 9public 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}