Might help to know how they are actually wired? Looks like the devices have 8 pins, but your encoder connections have 6? I am assuming you just wire both the 3.3v and 5v to each other to the unit, like the wiring diagrams show in pdf? How long are the wires? ...
Also did you try just trying one unit wired to it?
Also would try adding one or more Pull up resistors to the SPI setup. Probably for sure on MISO pin, maybe SCK as well?
Search forum, to see if any other hints, like: https://forum.pjrc.com/threads/35882...48a#post112138
Maybe try adding in some delays? With the code:
Code:
SPI.beginTransaction(settings);
//Send the command
digitalWrite(_cs, LOW);
SPI.transfer(left_byte);
SPI.transfer(right_byte);
digitalWrite(_cs,HIGH);
//Now read the response
digitalWrite(_cs, LOW);
left_byte = SPI.transfer(0x00);
right_byte = SPI.transfer(0x00);
digitalWrite(_cs, HIGH);
//SPI - end transaction
SPI.endTransaction();
Maybe add something like: delayMicrosoconds(5);
After setting the cs LOW?
Maybe try slower SPI Clock speed. It says a minimum of 50+50ns for the clock but maybe nto working properly... Maybe try something like 8mhz...
Again just doing shotgun answer hopefully something hits...