Does SPI header pins are separated from D10,D11,D12.
Basically, can I use D10-12 pins to control something, and use SPI header pins for communication with other device? If yes how should I properly configure it?
afedorov:
so basically I either can use header or D* pins for SPI. If D* pins are used for other things, I can't use SPI
No, you can connect several devices to the SPI bus, as long as only one device is active.
Maybe you should tell us what you really want to do, so we don't have to guess.
Leo..
I want to connect second arduino nano so I can send logs there and store in SD card. I can't write to SD in my main arduino nano as I don't have enough free memory for buffer.
The issue I "may" have is that is I used all my A* pins and need to use D10-12 to connect some sensors, if sensors don't use SPI protocol, what will happen if I use SPI header pins and D10-12 simultaneously
If you're using the SPI pins for SPI then you should not use those pins also for something else. It sounds like you might be better off just using a Mega, which should provide enough memory and pins for everything. Of course that's not the only option. You can add more pins to your Nano via external components. You might be able to work within the available memory by modifying your code.
A Teensy 3.5 might be better. More pins than a Nano and it has an SD card slot which doesn't share pins with the header pins.
It is 5v "tolerant" which means that it can accept 5v digital inputs but analog inputs over 3.3v will read 1023 and digital outputs will only go up to 3.3v
Or maybe a Teensy 2 has enough pins for what you need?