Hi all,
I have reseached all I could but it didnt get me any further.
Generally my project is to build a thermometer sending its data via an NRF24 and also logging it on board.
The NRF24 is to be run off of the VSPI on the ESP
The MAX6675 and the SD card should be run off of HSPI
As you may expect - it did not work.
Right now I am trying to get the SDFat run SD card to initialize. Wiring should be ok, using the arduino on-board SD library I can access it just fine. But, as it is know that the SD library is not to be used with any other device on the same SPI bus I had to switch to SDFat.
I tried to use the SDInfo.ino and adapted it. I dont use PIN12 for MISO as it (knownly) tends to give you problems during upload of the sketch.
So first I added 2 SPI Classes as explained in the SPI_MULTIPLE_BUSSES.ino example.
vspi = new SPIClass(VSPI);
hspi = new SPIClass(HSPI);
//hspi->begin();
//alternatively route through GPIO pins
hspi->begin(14, 26, 13,25); //SCLK, MISO, MOSI, SS
I dont begin VSPI because I dont use it atm.
On Github (GITHUB_SDFAT) is says:
Support for multiple SPI ports now uses a pointer to a SPIClass object.
See the STM32Test example.
explicit SdFat(SPIClass* spiPort);
\\ or
explicit SdFatEX(SPIClass* spiPort);
so I expected this to work:
if (!sd.cardBegin(&hspi,25)) {
sdErrorMsg("\ncardBegin failed");
return;
}
Sadly I get:
no matching function for call to 'SdFat::cardBegin(SPIClass*&, int)'
I suspect I just messed up something small but I just dont understand.
So in general I am trying to get the SD card (not the 3.3V China module, I dont have a Level adaption) and MAX6675 on Pins:
CLK,MISO,MOIS,SS
SD 14, 26, 13, 25
MAX 14, 26, 13, 27
Any help here? I am a bit lost right now...