I want to communicate between RPi (Master) and Arduino (Slave) using SPI and WiringPi library. I have read the following post, which talks about sending and receiving data between RPi and Arduino.
With this method, I can send and receive 1 byte of data. My question is how to send/receive "int", "float" or "string" data types? I understand that I should send the data 1 byte at a time, but I can't figure out how to decode the data.
I read the following post by Nick Gammon, to send/receive any data type. But the problem is that the wiringPi library sends the data as 1 byte, however if I want to send a pointer, like the following link, the size of pointer is 4 bytes and I get errors.