   ioDeviceDigitalWriteS(switches.getIoAbstraction(), ledPin, currentLedState);
 }
 
+void onRepeatButtonReleased(uint8_t pin, bool heldDown) {
+  Serial.print("Released repeat button - previously ");
+  Serial.println(heldDown ? "Held" : "Pressed");
+}
+
 //
 // Each time the encoder value changes, this function runs, as we registered it as a callback
 //

  // which is the repeat interval (millis / 20 basically) Repeat button does repeat as we can see.
  switches.addSwitch(spinwheelClickPin, onSpinwheelClicked);
  switches.addSwitch(repeatButtonPin, onRepeatButtonClicked, 25);

  // now we set up the rotary encoder, first we give the A pin and the B pin.
  // we give the encoder a max value of 128, always minumum of 0.

#include<IoAbstractionWire.h>

// The pin onto which we connected the rotary encoders switch
const int spinwheelClickPin = 5;

// The pin onto which we connected the repeat button switch
const int repeatButtonPin = 4;

// the led pin on the IO ioDevice
const int ledPin = 1;

// The two pins where we connected the A and B pins of the encoder. I recomend you dont change these
// as the pin must support interrupts.
const int encoderAPin = 6;
const int encoderBPin = 7;

// the maximum (0 based) value that we want the encoder to represent.
const int maximumEncoderValue = 128;
