Cayenne + am2301 (temp. sensor) + sd card

I think my wiring is incorrect.

Maybe you can help me with wiring

Nodemcu SPI pins:-
D5- SCK
D6- MISO
D7- MOSI
D8 - CS

Yes, i have wiring like this.

But this message is shown:

‘dataFile’ was not declared in this scope.

When i delete… //dataFile.print(" | ");…uploading is done but this message is shown:

Leaving…
Hard resetting via RST pi…

And nothing is happening.

i dont see datafile anywhere in this code.