Needs["NETLink`"]

InstallNET[];

ser = NETNew["System.IO.Ports.SerialPort","COM4",9600]

ser@Open[]

Func[x_] := If[x==65,Print[Style["Detected",Red,100,Italic]]]

Dynamic[Refresh[input = ser@ReadChar[];Func[input];,UpdateInterval->1.0]]

ser@Close[]