Java, IoT, Programming, Software Development, Software Engineering.
pi4j.digitalOutput().create(PIN_LED); while (pressCount < 5) { if (led.state() == DigitalState.HIGH) { led.low(); } else { led.high(); } Thread.sleep(500 / (pressCount + 1)); } Here button press example: private static int pressButtonCounter = 0; private static final int PIN_BUTTON = 24; var