I'd like to know if it's possible to use the ICSP header pins on the Leonardo as GPIO pins, for example for software serial, and how to address them. I've a project which needs all available I/O pins, and I could use having serial comms on those "extra" pins.

1 Answer 1


From packages/arduino/hardware/avr/1.6.*/variants/leonardo/pins_arduino.h:

// Map SPI port to 'new' pins D14..D17
#define PIN_SPI_SS    (17)
#define PIN_SPI_MOSI  (16)
#define PIN_SPI_MISO  (14)
#define PIN_SPI_SCK   (15)

static const uint8_t SS   = PIN_SPI_SS;
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK  = PIN_SPI_SCK;

Those are the pin names and numbers you can use. Note that SS/17 is connected to the RX LED.

  • Thanks! I'll test it as soon as I have some time to spare! ;) Commented Nov 10, 2016 at 17:02
  • It works, though SoftwareSerial don't seem to be able to manage baud rates of 115200 bps, which I need.. :$ Commented Nov 10, 2016 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.