Half-duplex SPI on Leonardo

Edit: Found my problem. When using SPI, you have to do a line like  pinMode(chipSelectPin, OUTPUT);in setup() because spi.Begin() doesn't know what pin you're using.