Skip to content

Commit 06ead6c

Browse files
committed
Push-Button Patch
1 parent a8c362c commit 06ead6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/JoystickModule.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ public void initializeModule(double thresholdAnalogValue,Pin SW_Pin) throws IOEx
8181
mcp3008GpioProvider.setEventThreshold(thresholdAnalogValue, gpioPinAnalogInput);
8282
mcp3008GpioProvider.setMonitorEnabled(true);
8383
mcp3008GpioProvider.setMonitorInterval(250);
84-
gpioPinDigitalInput=gpioController.provisionDigitalInputPin(SW_Pin);
84+
gpioPinDigitalInput=gpioController.provisionDigitalInputPin(SW_Pin,PinPullResistance.PULL_DOWN);
85+
gpioPinDigitalInput.setShutdownOptions(true);
86+
8587
}
8688
public void startCollectingChannelsData(){
8789
if(gpioController==null || mcp3008GpioProvider==null){

0 commit comments

Comments
 (0)