Hi,
I have compatibility problems with the above mentioned module and I hope any of you guys will be able to help .
I recently got my hands on an Adafruit Bluefruit LE SPI Friend module. There is port available yet for the photon, but porting the arduino library was relatively simple (or so I thought).
I connected the module to the SPI1 pins, the IRQ pin is connected to D6 and the RST pin is connected to D7 and the CS pin of the module is connected to D5 (I am also defining D5 as the SS pin). While triggering the factory reset of my module works just fine (using the RST pin, sending the āAT+FACTORYRESETā command doesnāt work), there doesnāt seem to flow any information from the photon to the module or vice versa. I double checked the connections, all pins are connected correctly. I am using hardware SPI, however, I also tried to use software SPI, there was no difference.
I suspect I messed up the SPI settings. The library initially set the SPI settings to 4MHz, MSBFIRST and SPI_MODE0:
SPISettings bluefruitSPI(4000000, MSBFIRST, SPI_MODE0);
While porting the library, I used the same settings:
SPIClass UsedSPI = SPI1;
void Adafruit_BluefruitLE_SPI::setSPI(){
UsedSPI.setBitOrder(MSBFIRST);
UsedSPI.setClockSpeed(4000000);
UsedSPI.setDataMode(SPI_MODE0);
}
while looking for answers I came across the āSETCLOCKDIVIDERREFERENCEā function, but I donāt think I need to use it since I donāt call the SetClockDivider function anywhere.
I tried sending multiple commands. After sending a command, the photon expects an answer. The module should indicate, that there is data available, by setting the IRQ pin to hight, but the pin is never high (so no data available).
I am using the latest firmware on both, the photon and the module. The library, Iām trying to port, can be found here:
https://github.com/adafruit/Adafruit_BluefruitLE_nRF51
Iād be happy to make the port available to the community, if by some miracle Iāll manage to make it work