I am trying to communicate using SPI protocol between two arduino uno boards. I have writthen a very simple code to transfer a single character from master. The code is as following
void setup (void)
void loop (void)
digitalWrite(SS, HIGH); // ensure SS stays high
delay (5000); // 5 seconds delay to start logic analyser.
// enable Slave Select
digitalWrite(SS, LOW); // SS is pin 10
// send test string
SPI.transfer ( 'c');
// disable Slave Select
// turn SPI hardware off
while (1); //loop
Please correct the code if its not right. And I really want to know that how to recieve that character on arduino uno in slave mode. There is a command SPI.transfer() to send data on SPI where as I haven't seen any command to recieve it.
Thanks and regards
Moderator edit: [code] [/code]