Hi,
developed a simple B4J server application (using websockets) to switch, via Browser, a LED connected to the GPIO PIN 1 On/Off. Information in the Browser is updated while blinking...
When opening in the Browser, the app is running OK, but when the Browser is refreshed the app crashes:
Searched several threads and it seems the Pin has to be released by using API method (included in pi4j-core.jar)
This could be accomplished in Websockets_Disconnect.
Currently the jPi4J library does not contain such a method.
Question: Is there a workaround avialable or would it be possible to include the method unprovisionPin in jPi4J libary?
Appreciated
developed a simple B4J server application (using websockets) to switch, via Browser, a LED connected to the GPIO PIN 1 On/Off. Information in the Browser is updated while blinking...
When opening in the Browser, the app is running OK, but when the Browser is refreshed the app crashes:
B4X:
java.lang.RuntimeException: com.pi4j.io.gpio.exception.GpioPinExistsException: This GPIO pin already exists: GPIO 1
Searched several threads and it seems the Pin has to be released by using API method (included in pi4j-core.jar)
B4X:
gpio.shutdown();
gpio.unprovisionPin(pin);
This could be accomplished in Websockets_Disconnect.
Currently the jPi4J library does not contain such a method.
Question: Is there a workaround avialable or would it be possible to include the method unprovisionPin in jPi4J libary?
Appreciated