Arduino SPI

I was looking into the SPI library and the transfer function seems to return a value whenever it is called. Is it possible to write a value without returning? Right now I set up a dummy variable to hold the value of anything that comes back.

Also, when the Arduino requests a read from my CAN bus, it expects a return of up to 16 bytes but the transfer function will only return 1 byte. I am unsure of how the CAN bus will react if I call the read command 16 times. Is there a way to read multiple bytes without having to send multiple read commands?

Just do a SPI.transfer without saving the result, eg.

SPI.transfer (0x42);


what about receiving more than 1 byte at a time?

You do one byte at a time. Read the linked thread.