I am quite new to use Photon and my goal with this SPI interface will be to lately transfer sensors data to the Cloud.
My sensors are being measured by an Arduino and to make sure I was using a correct code on this end I used the DigitalPotControl example in SPI library with some Serial notes to help debug.
On the other end, I have my Photon defined as slave.
In addition to this code I also added:
In the beginning of my code.
As you can see I added some Particle.publish() to help me see how the code is running.
In my events page, I have both SPI: IN LOOP and SPI: SS is ON showing up.
This means the slave pin is being pulled down by the Arduino.
However, SPI.available() stays 0 all this time and doesn’t allow the transfer.
I also tried to replace SPI.available() condition by the state of Slave pin. However, it prints the rx_buffer as NULL.
Any ideas where this problem might arise from? My last two days have basically been focused on this one issue (even though a special important one).