# Change XYZ to the UID of your Distance US Bricklet

setup:
	# Handle incoming distance value callbacks
	subscribe to tinkerforge/callback/distance_us_bricklet/XYZ/distance
	publish '{"register": true}' to tinkerforge/register/distance_us_bricklet/XYZ/distance # Register distance callback
	
	# Set period for distance value callback to 0.2s (200ms)
	# Note: The distance value callback is only called every 0.2 seconds
	#       if the distance value has changed since the last call!
	publish '{"period": 200}' to tinkerforge/request/distance_us_bricklet/XYZ/set_distance_callback_period
