Hey alan_lima
I didn't read your whole code, but I can tell you that you are using the wrong SPI settings.
Try exchanging the following part:
alan_lima:
SPI.begin();SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(16);
SPI.setDataMode(SPI_MODE0);delay(100);
with that:
//start the SPI library;
SPI.begin();
SPI.beginTransaction(SPISettings(1000000,MSBFIRST,SPI_MODE0)); //Set SPI to 1MHz, MSBFIRST and SPI_MODE0