I have an RFID reader connected to an Arduino board. I would like to connect to it through its serial interface, and whenever an RFID reader passes a signal (when it reads an identifier (RF)), I would like to get it in my C ++ program.
I already have code for simple printing RFID to serial from Arduino.
What I do not know how to read it from C ++ on Linux?
I looked at libserial , which looks simple. However, how can I make a C ++ program respond to a signal and then read the RFID, rather than listen constantly? It's necessary?
EDIT: In most of the examples I read, the program (C ++) sends the input and gets the result. I just want to listen and get results from Arduino.
c ++ linux serial-port arduino rfid
meastp
source share