The following is not needed:
pinMode(DATAOUT, OUTPUT);
pinMode(DATAIN, INPUT);
pinMode(SPICLOCK,OUTPUT);
As the SPI library will set this up for you, if you call "SPI.begin()" instead
The following is not needed:
pinMode(DATAOUT, OUTPUT);
pinMode(DATAIN, INPUT);
pinMode(SPICLOCK,OUTPUT);
As the SPI library will set this up for you, if you call "SPI.begin()" instead