1 Reply Latest reply on Jan 22, 2016 6:44 AM by DiegoV_Intel

    SPI connection Galileo- Arduino


      Hi folks...


      I have connected Intel Galileo gen1 and Arduino uno in SPI communication as Galileo as a Master device and Arduino as a  Slave device .Now,  I want to  transfer my sensor (IR distance sensor)   values with current stamps from slave( Arduino) to Mastar (Galileo)device continueously. In parallel to that I want to get acknowledgement from master to slave. I am using MRAA 0 .9.0.  library.

      in Galileo and writing in C++ by using putty serial terminal.


      Any help would be appreciated.

        • 1. Re: SPI connection Galileo- Arduino

          Hello gopal1096,


          First I recommend you to check the MRAA documentation and the C/C++ API where you will find a description of the functions for SPI:


          You won't be able to send an acknowledgement in parallel because SPI is a serial protocol. This means that you will have to send the acknowledgment once the Master has received the data from the Slave. It would interrupt the data transmission just for a moment while the acknowledgment is received by the Slave.


          The process of sending data should be something like the following:

          1. Master requests data from Slave.
          2. Slave receives the request.
          3. Slave starts sending data.
          4. Master receives the data from Slave.
          5. Master sends an acknowledgment after checking the data received.
          6. Slave receives the acknowledgment.
          7. Slave starts sending data again and the process is repeated.


          You will find in the links above all the information required to write the script. Basically you have to use the transfer method to transfer data between Master and Slave.