How to use all available pins on Leonardo (atmega32U4)

Here is an example of mapping / using many of those extra pins, including PD5

See the readme in that repo for instructions on replacing your pins_arduino.h file with the one provided.

This, for example, maps PD5 to Digital Pin 30. I am using it successfully with the Lillypad Arduino USB bootloader (this badge uses an external 8 MHz crystal)