I don't see how the code above addresses the issue. Here is something closer to what you said it needed:
#include <SPI.h>
const byte SlavePin1 = 10;
void setup ()
{
Serial.begin (115200);
} // end of setup
void loop ()
{
union
{
byte byteResult [4];
unsigned long longResult;
} temperature;
digitalWrite(SlavePin1, LOW);
// read all 4 bytes
for (byte i = 0; i < 4; i++)
temperature.byteResult [i] = SPI.transfer (0);
digitalWrite(SlavePin1, HIGH);
Serial.println (temperature.longResult);
delay(1000);
}
You said the device returns four bytes once CS is asserted. So, you do 4 x SPI.transfer. Since you don't have anything connected to MOSI then you may as well send zero as anything else. If the endian-ness is the other way around, read into the array in the other order.