#include //globals int receivedValue; void setup(){ pinMode(SS, OUTPUT); // set the chip Select pin to be an output, //so that this board knows it is the master device SPI.begin(); SPI.setBitOrder(MSBFIRST); // send the most significant bit first SPI.setDataMode(SPI_MODE0); // have data be collected by each device on the falling clock edge } void loop(){ digitalWrite(SS, LOW); receivedValue = SPI.transfer(0b11111111); // send eight 1's digitalWrite(SS, HIGH); delay(1); digitalWrite(SS, LOW); receivedValue = SPI.transfer(0b00000000); // send eight 0's digitalWrite(SS, HIGH); delay(1); }