change the pen down interrupt pin to GPIO_GEN2 of Raspberry Pi P1 port.