Gps enable/disable using push button

Hello! Everyone I am a beginner in this project may I ask on how to enable and disable GPS using push button and the codes. Thank you

Hi @Sukehitaro

If you are referring to an external button, check out this clickButton library or search clickButton in particle build.

What GPS receiver are you using?

Adafruit Ultimate GPS Breakout

There is EN pin on the breakout to enable/disable the device.

By pulling that pin low (e.g. via digitalWrite(yourEnPin, LOW)) you will power down the GPS module.
In order to keep the GPS fix when disabling the GPS receiver you should keep VBAT powered.