SPI communication with MLX90395

Good day,
I am trying to create a simple program for checking a functionality of a MLX90395.
so far, i am having incredibly difficult times trying to communicate with it.
because every time a try to get response from it, i get all 1s or 255.
code attached. Very crude. I am not very good programmer.
what i am trying to do is Reset, Exit mode, start single measurement, read measurement.

mlx_meb.ino (312 Bytes)

what i am trying to do is Reset, Exit mode, start single measurement, read measurement.

You REALLY need some named values in your program. You need to explain why you think 0b11110000 means squat to the device you are talking to.

I assume that you have confirmed that the device is connected correctly, by using the I2C scanner sketch. But, I should NOT have to assume anything.