I have a problem trying to use pin 6 (wiring) in java. I get the error:
sudo java -jar ICM.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: Unable to open GPIO direction interface for pin [6]: Arquivo ou diretório não encontrado
at com.pi4j.wiringpi.GpioUtil.export(Native Method)
at com.pi4j.io.gpio.WiringPiGpioProviderBase.export(WiringPiGpioProviderBase.java:108)
at com.pi4j.io.gpio.impl.GpioPinImpl.export(GpioPinImpl.java:158)
at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionPin(GpioControllerImpl.java:566)
at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:718)
at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalOutputPin(GpioControllerImpl.java:730)
at Background.Services.GPIO.registraGPIOEnvase(GPIO.java:82)
at Background.Services.GPIO.<init>(GPIO.java:74)
at Background.ManagerIO.initGPIO(ManagerIO.java:80)
at Background.ManagerIO.<init>(ManagerIO.java:51)
at Main.Main.main(Main.java:18)
... 5 more
The error occurs when setting pin 6 to output, as follows:
outPino6 = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_06, "outPino6", PinState.HIGH);