Help reading from my sensor using SPI

Right now I am reading from the ID reg to test if my read/write functions are correct for my sensor.
The picture attach is my read and write functions.

I have currently tried three different scenarios:

  • With a 4.7K resistor connecting the MOSI to MISO line
    my output was 0xC0

  • a 10k resistor connecting MOSO to MISO line,
    my output was 0xFF

-and then I set the MOSI line from output to input and back again
my output was 0xFF

The register is defaulted to 0x3D. Anyone have any suggestions at what to look at for this error?

code.PNG

Just done quite an extensive search to try to find the answer to this. Although I've seen reference to the fact that it's possible, I can't find any documentation specifying how to use SPI with the LSM303.

It seems the most common way to interface with these things is through I2C. This may be the path of least resistance.

I'm going to have two sensors connected so this will most likely end up being the easiest oath to take.