Java, IoT, Programming, Software Development, Software Engineering.
buttonConfig = DigitalInput.newConfigBuilder(pi4j) .id("button") .name("Press button") .address(PIN_BUTTON) .pull(PullResistance.PULL_DOWN) .debounce(1000L); var button = pi4j.create(buttonConfig); button.addListener(e -> { if (e.state() == DigitalState.LOW) { pressButtonCounter++;