One way to do this is to use a relay triggered by the Photon (with the aid of a MOSFET and potentiometer) - when the relay is not powered, the voltage across H1 is 5V, and when the relay is powered the voltage across H1 is ~ 1.5V.
Note: The LiPo Battery in the Fritzing diagram is connected to the Particle Photon's VBAT pin for illustration.