How can i get data from my gps and barmometer to store it on a microsd ?

Hello everyone,

Currently , i want to launch an altitude balloon so i am sending a payload with a gps (ada fruit ) and barometer (ada fruit) also ,

i can get the gps to work by itself and the barometer to work by itself but i find it extremely challenging to get both work at the same time and writing data to the microsd , the micro sd i am using is the one attached to the gps ultimate logger (ada fruit) ,
can any one have a solution to this ?

Post your code.