Designing a RFID temperature sensor, question about SPI

Hi there. I am currently using the electron to build an RFID temperature sensor. The idea is to use electron 2G module to control a transceiver MLX90132 by SPI. The transceiver has antenna so I will be able to communicate with a transponder MLX90129 to obtain the temperature reading. My current challenge is about SPI. Would anyone be able to provide me some example so I can understand it a little morer?

That’s a rather broad question.
What exactly do you need clarification that you don’t find covered in the docs or the web?

Hi ScruffR, thank you for respond.
I am experiencing a hard fault when the electron execute the SPI2.transfer. The electron give me a blink red light when it start to execute the SPI2.transfer code.
Here is my code.
Would you midnd to take a look and tell me what I did wrong?
Also is that possible to give me some example on using SPI with electron?
Thanks a lot.

The link is over here:

If you use the “share this project” link from the web IDE, we can try the application you’re running without having to type everything over. That’d also allow us to look at the entire code, rather than just a snippet.

Thanks for let me know. I already add it in.

What system version are you targeting?

I don’t have an MLX90132 or MLX90129 but I don’t get a hard fault when running your code.

How long after startup does it happen?
Is it really an SOS followed by one red blink followed by another SOS panic?

I can only see the red charging LED and the red RGB phases caused by your code.

I am currently using 0.5.3.
It is really an SOS followed by one red blink. I change the red color to blue and I still receive one red blink between two SOS.

I tested my code on the other electron that I have. It ran the V6.0 system. There is no error code. I believe the problem is caused by the system version. I guess update the system will solve my problem. Thanks for the help.