Arduino MEGA XBEE GPS ENERGY PROBLEM!

I have XBee S2C and GY Neo 6MV2. I want to send gps coordinates to other xbee arduino.

In first Arduino(MEGA) GPS sensor and xbee sensor are not working at the same time.

Xbee is disabled when energizing the GPS sensor from 5V.
I tried a few energy combinations but I couldn't make it.

Other Arduino is okey

Thank you

Its an error in you code, or an error in how its all connected.

If you are really after help, do you think it would help to describe the project and provide the details ?

srnet:
Its an error in you code, or an error in how its all connected.

If you are really after help, do you think it would help to describe the project and provide the details ?

Okey I found it. I put the pin to the wrong place

gunesmadrali:
Okey I found it. I put the pin to the wrong place

Good.

Always a useful troubleshooting step to check that you have the correct connections.