SPI communication on MEGA2560

Hello

I want to use the TN9 sensor which is SPI based. Im not sure how to connect it to my arduino MEGA2560.
The Sensor: http://www.metrisinst.com/products/details?id=315

How do i connect the TN9 to the MEGA2560 exactly ?

Do i use the MOSI MISO SCK SS (slave) ?

This might help answer your questions: GitHub - freetronics/IRTemp: Infrared non-contact thermometer module driver for Arduino

Cheers!

Well based on the code i wired my arduino and the TN9 to pins D=2,C=3,A=4,G=GND,V=5V.
But i do not get any readings from the sensor whatsoever. It continously returns " IR / Ambient = Failed"
I should clarify that the TX led is flashing (obviously based on the ms delay in the library you posted it flashes slower/faster).
even if i remove the sensor itself i still get the previous returning message on the Serial Monitor.

Im trying to figure out whether this is a software or wiring problem. Or even a defective sensor.

Im a newbie anyways so i'm pretty sure that the sensor is not defective, i must be doing something wrong.

Well based on the code i wired my arduino and the TN9 to pins D=2,C=3,A=4,G=GND,V=5V.

If the TN9 is an SPI device, why are you not connecting it to the SPI pins?