# Change XYZ to the UID of your Distance IR Bricklet

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