Setup:
Arduino Uno Rev. 3 (2 of these)
Si4735 Shield https://www.sparkfun.com/products/10342
Si4735 Library GitHub - jjcarrier/Si4735: A library for arduino Si4735 shield from sparkfun
Wire.h Guide http://marcoramilli.blogspot.com/2011/10/communication-between-multiple-arduino.html
What I am Doing:
I am trying to play FM radio using the Si4735 and communicate with another Arduino Uno using Wire.h and example code from the Guide I listed above. Both of these work on their own, but now I am trying to combine them.
What is the Problem:
I can communicate between both Arduinos just fine, however when I try to perform some tasks on the Si4735 I need to do an SPI transfer and I use this function:
char Si4735::spiTransfer(char value){
SPDR = value; // Start the transmission to the register
while (!(SPSR & (1<<SPIF))) {}; // Wait for the end of the transmission
return SPDR; // return the received byte
}
Only to find that I get stuck in the while loop, waiting for end of transmission. I am not sure why, any ideas or suggestions?