diff --git a/micronautpi4j-utils/src/main/java/com/opensourcewithslu/utilities/Pi4JFactory.java b/micronautpi4j-utils/src/main/java/com/opensourcewithslu/utilities/Pi4JFactory.java index 25e26e61..9cd5dc4d 100644 --- a/micronautpi4j-utils/src/main/java/com/opensourcewithslu/utilities/Pi4JFactory.java +++ b/micronautpi4j-utils/src/main/java/com/opensourcewithslu/utilities/Pi4JFactory.java @@ -34,7 +34,6 @@ public com.pi4j.context.Context createPi4jContext() { // Build Pi4J context with this platform and PiGPIO providers return Pi4J.newContextBuilder() .noAutoDetect() - .add(new RaspberryPiPlatform()) .add( PiGpioDigitalInputProvider.newInstance(piGpio), PiGpioDigitalOutputProvider.newInstance(piGpio), @@ -43,6 +42,12 @@ public com.pi4j.context.Context createPi4jContext() { PiGpioSerialProvider.newInstance(piGpio), PiGpioSpiProvider.newInstance(piGpio) ) + .add(new RaspberryPiPlatform(){ + @Override + protected String[] getProviders() { + return new String[]{}; + } + }) .build(); }