Go Down

Topic: SPI communication on MEGA2560 (Read 603 times) previous topic - next topic

DeathByCh0c0

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) ?



kowalski

This might help answer your questions: https://github.com/freetronics/IRTemp

Cheers!

DeathByCh0c0

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.


PaulS

Quote
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?
The art of getting good answers lies in asking good questions.

Go Up