// make sure pin starts in active state
pin.setState(blinkState);
// create future job to toggle the pin state
ScheduledFuture<?> scheduledFutureBlinkTask = scheduledExecutorService
.scheduleAtFixedRate(new GpioBlinkTaskImpl(pin), delay, delay, TimeUnit.MILLISECONDS);
// get pending tasks for the current pin
ArrayList<ScheduledFuture<?>> tasks;
if (!pinTaskQueue.containsKey(pin)) {
pinTaskQueue.put(pin, new ArrayList<ScheduledFuture<?>>());