I am attaching and detaching it because I dont want the laptimer to get triggered until a certain amount of time has past (there could be other beacons on the pit wall). Also because I´m using a beacon with a 5 ms period square signal, and this way is the easiest one to avoid multi triggering.
I am using interrupts because of the high frequency of the signal. I am afraid that using the polling method would probably miss some signal. Do you recomend me any other method?
In the Spanish forum recomend me to use an empty dummie function, and call it instead of detaching the interruption, and it worked good.
Thank you all for your help, and if you think of any other way to get it working or just a more efficient one and you like to contribute do not hesitate to post it!