Uploding data to thinger in different time interval

hello,
i am using ultrasonic sensor and successfully upload the sensed data to thinger every 1 min.
now i want my time gap should depend upon the sensed data i.e. if “x” distance sensed than upload data in 1 min gap and if “y” distance is sensed than upload data in 30 sec gap.
please help if any one have any idea how to achieve it.

Hi, you have to set the bucket with ‘Update by Device’. And then stream the resource when you require in your device.

How to stream a resource: http://docs.thinger.io/arduino/#coding-streaming-resources

Hope it help!