Hello,
I'm a recent Arduino's user. I'm French, and perhaps not a English master...
I'm trying to build a weather station.
I'm using a UNO-smd-R2 with a Sparkfun SD-shield and a barometric pressure captor MPL115A1.
The both compoments use the SPI. They are running perfectly, but when try to gather the both, SD-shield and MPL115A1, this last one is inactive, sending false values.
My outline is this following:
D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2
MPL115A1 SCK SDO SDI ___ SDN ___ ___ ___ ___ CS_ ___ ___
SD-Shield CLK MISO MOSI___ ___ CS ___ ___ ___ ___ ___ ___
>>I decided to avoid the pin 10 which is the internal ChipSelect from de ArduinoBoard. I don't know if it's a good choice or good understanding? I understood the ArduinoBoard must stay the master shield...
>>In my scketch, I delcared the chipselects PINs, D4 and D8 in Output for the initialization : digitalWrite(CS_PIN, output);. When I want to control and read the MPL115A1, I switch the SD-shield chipselect on a High level : digitalWrite(CS_PIN, high)
I had the scketch in the attachment, if someone can help me to understand, find the good way or my mistakes, I will be so grateful.
And sorry again if my English translation is not so well...
Moderator edit: [code] ... [/code] tags added. (Nick Gammon)