diff --git a/src/main/java/com/example/LEDStrip.java b/src/main/java/com/example/LEDStrip.java index d05fc94..7d13ccf 100644 --- a/src/main/java/com/example/LEDStrip.java +++ b/src/main/java/com/example/LEDStrip.java @@ -123,11 +123,12 @@ public LEDStrip(Context pi4j, int numLEDs, double brightness, SpiBus bus, SpiChi private SpiConfig buildSpiConfig(Context pi4j, SpiBus bus, SpiChipSelect channel, int frequency) { return Spi.newConfigBuilder(pi4j) .id("SPI" + 1) - .name("LED Matrix") + .name("LED Strip") .bus(bus) .chipSelect(channel) .mode(SpiMode.MODE_0) .baud(8 * frequency) //bitbanging from Bit to SPI-Byte + .provider("pigpio-spi") .build(); } diff --git a/src/main/java/com/example/MCP23S17.java b/src/main/java/com/example/MCP23S17.java index 6c385b1..7e3e0a1 100644 --- a/src/main/java/com/example/MCP23S17.java +++ b/src/main/java/com/example/MCP23S17.java @@ -784,10 +784,11 @@ private MCP23S17(Context pi4j, */ private SpiConfig buildSpiConfig(Context pi4j, SpiBus bus,int frequency) { return Spi.newConfigBuilder(pi4j) - .id("SPI" + 1) - .name("LED Matrix") + .id("SPI" + 2) + .name("GPIO-Circuit") + .description("SPI-Config for GPIO-Extension Integrated Circuits (MCP23S17)") .bus(bus) - .chipSelect(SpiChipSelect.CS_0) + .chipSelect(SpiChipSelect.CS_2) .mode(SpiMode.MODE_0) .baud(frequency) .build(); diff --git a/src/main/java/com/example/Main.java b/src/main/java/com/example/Main.java index c6333fc..7e3dfcc 100644 --- a/src/main/java/com/example/Main.java +++ b/src/main/java/com/example/Main.java @@ -153,7 +153,7 @@ private void run(Context pi4j) throws Exception { int pixels = 12; - ledStrip = new LEDStrip(pi4j, pixels, 1.0, SpiBus.BUS_1); + ledStrip = new LEDStrip(pi4j, pixels, 1.0, SpiBus.BUS_0); ledStrip.allOff(); int h=0; while(h++ < 10000) { diff --git a/target/classes/com/example/Main.class b/target/classes/com/example/Main.class index 778efc3..5010b0c 100644 Binary files a/target/classes/com/example/Main.class and b/target/classes/com/example/Main.class differ diff --git a/target/lib/remoteDebugTest.jar b/target/lib/remoteDebugTest.jar index 79a6687..5473017 100644 Binary files a/target/lib/remoteDebugTest.jar and b/target/lib/remoteDebugTest.jar differ