how can I open a program on a computer using RFID?
I have a few different tags, depending on the tags a program needs to open. I succeeded to read the tags and convert the information to a certain value, but now I do not know how to open a file outside arduino. Is there a command to do this?
Preferably, I need to open a GUI using flash, but I guess it will take the same command.
It depends on what OS you are running but you need a program on it to take the input from an arduino and do the actual opening. You can write this in any language you want. On a Mac apple talk is great for this.
Yes but you have to get something listen to the serial port and then translate that to the path name, there is nothing that just reads the serial port and then issues it as a command, think of the security implications of that!
Hers is a simple apple script application to read the serial port and then do something with what you get:-
set arduinoPort to "/dev/cu.usbmodem1d11"
-- this opens the port and resets the arduino
set arduino to serialport open arduinoPort bps rate 9600 data bits 8 parity 0 stop bits 1 handshake 0
if arduino is equal to -1 then
display dialog " could not open port "
else
repeat -- repeat forever
-- wait until something is sent
set bytesIn to 0
repeat until bytesIn is not equal to 0
set bytesIn to serialport bytes available arduino
end repeat
set cmd to serialport read arduino for 1
set cmds to cmd as string
-- display dialog "Command recieved = " & cmds
if cmds is equal to "1" then
display dialog "Command 1 recieved"
end if
if cmds is equal to "2" then
display dialog "Command to quit recieved"
exit repeat
end if
end repeat -- of the forever repeat
-- note this next bit will reset the arduino
serialport close arduino
end if
You need to change the first line:-
set arduinoPort to "/dev/cu.usbmodem1d11"
to match what you see as the arduino on the serial port.