Right now I am testing my read function by trying to read the ID register on my sensor. The serial monitor is not showing anything. Below I will post links for my read function, circuit diagram, and the data sheet for the sensor.
I have tried several serial.print statements but I am not getting anything to show in the serial monitor.
Read function:
byte LSM303_read(byte address)
{
byte value;
digitalWrite(CS_MAG,LOW); // assert chip select
SPI.transfer(0x80 | address); // make request byte
value = SPI.transfer(0x00); // read result
digitalWrite(CS_MAG, HIGH); // deassert chip select
return value;
}
Data sheet:
http://www.st.com/web/en/resource/technical/document/datasheet/DM00089896.pdf
circuit diagram:
EDIT: I attached the init and loop functions in the picture attached.

