Move Trigger function from isr.c to main.c, tested work