Serial Interrupt

02 May 2011

Hi everyone,

I have a ID12 RFID reader and I want to stop/start the program flow when ever an authorized ID tag has been placed on it. I believe I need to use serial interrupt but I can figure out how exactly to do it. can anyone please give me an example?

Thanks, Ali

02 May 2011

Serial.attach(&YOUR_FUNCTION_NAME_HERE);

http://mbed.org/projects/libraries/api/mbed/trunk/Serial#Serial.attach

I think that should do it. :-)

Lerche

09 May 2011

Thanks, I got it to work. Now I'm trying to use this with RFID library. so that anytime an authorized ID tag is placed on, it starts/stops program flow. How should I modify the library in order to do that? I cheated and connected the RFID Uart Tx to another free serial port on mbed and attached the interrupt function to that serial port! It does the job, but it's not a clever solution I believe :)

Thanks again, Ali