I am attempting to read a resonant inductive distance sensor with a CAM204 chip. I previously tried to get the sensor to work directly with the arduino, and found that I should be using SPI through this post http://forum.arduino.cc/index.php?topic=277186.0
I am currently using the SPI functionality, by hooking the sensor to the Cam204 chip and that to the arduino uno. My problem is that I am not getting any value back via the SPI.transfer() method when i try to read the register.
Attached is my code. I am sending 2 bytes through SPI for the read command and address(opcode RESA) to be read, setting SS low, and attempting to read the register, setting SS high, and returning that value.
Have I forgotten a step? Any thoughts on how to troubleshoot this?
CAM204 datasheet: http://cambridgeic.com/images/downloads/033-0003_0010_(CAM204).pdf
riSensor.ino (1.88 KB)