import com.pi4j.io.gpio.GpioController; import com.pi4j.io.gpio.GpioFactory; import com.pi4j.io.gpio.GpioPinDigitalOutput; import com.pi4j.io.gpio.PinState; import com.pi4j.io.gpio.PinPullResistance; import com.pi4j.io.gpio.RaspiPin; public class BlinkLed { public static void main(String[] args) throws InterruptedException { int nbBlinks = 3; if (args.length > 0) { try { nbBlinks = Integer.parseInt(args[0]); } catch (NumberFormatException e) {} } final GpioController gpioCtrl = GpioFactory.getInstance(); final GpioPinDigitalOutput pin = gpioCtrl.provisionDigitalOutputPin(RaspiPin.GPIO_01, "Red led", PinState.HIGH); pin.setShutdownOptions(true, PinState.LOW, PinPullResistance.OFF); for (int i=0;i