Set subscribe handler data as global

Here’s my particle cloud event console. Seems like the LDR Threshold if statement inside the void loop() is not allowing the particle.subscribe(temp) and (pressure) to be read constantly.

I will re-write my code, replacing particle.publish/subscribe with MQTT.client publish.subscribe, use softaware timer functions and keep my void loop as clean as possible.