# Change XYZ to the UID of your IO-16 Bricklet

setup:
	# Handle incoming interrupt callbacks
	subscribe to tinkerforge/callback/io16_bricklet/XYZ/interrupt
	publish '{"register": true}' to tinkerforge/register/io16_bricklet/XYZ/interrupt # Register interrupt callback
	
	# Enable interrupt on pin 2 of port A: 1 << 2 = 4
	publish '{"port": "a", "interrupt_mask": 4}' to tinkerforge/request/io16_bricklet/XYZ/set_port_interrupt 
