Accessing Single SD card module by multiple controllers

Hi,

In my project, I have one UNO, MEGA, sensor and an SD card module. Via UNO, I want to store the senor value to the sd card. Then I also required to read the value from the SD card by MEGA.
I used two busy lines which are for just telling which controller is currently using the module.
But it's not working properly. Here, both controllers are sharing the module-pins. When I'm trying to cross-check the signals just by connecting LEDs parallelly to the module pins, I found that -either only one controller will work smoothly. Apart, for accessing the card module for the next controller, we need to reset the first controller. (For disabling the SCK, MOSI and MISO).

Can anyone please give me a solution for this?

Thank you...

Don't do that. Depending on which SD library you are using you could close the card (not just the file) in between using the card. (The standard Arduino SD library doesn't [or didn't] have a close method.)

But it's better to have only one Arduino talk to the card and have the other Arduinos ask that one to do what they need.