Using an Interval

Because a microcontroller is not a multitasking or multithreading device, you need to use loops to create an interval that listens for an event and only posts your data once in awhile. 

Here's an example that listens 30 seconds for a button to be pressed on a feed called "pump_feed" After the 30 seconds, it publishes the value of three sensors.