1 package kaka.cakelight;
3 import com.pi4j.io.spi.SpiChannel;
4 import com.pi4j.io.spi.SpiDevice;
5 import com.pi4j.io.spi.SpiFactory;
7 import java.io.IOException;
9 public class LedController {
10 private SpiDevice spi;
12 public static void main(String args[]) {
13 new LedController(null);
16 public LedController(Configuration config) {
18 spi = SpiFactory.getInstance(SpiChannel.CS0);
19 } catch (IOException e) {
24 public void onFrame(LedFrame ledFrame) {
26 spi.write(ledFrame.getBytes());
27 } catch (IOException e) {