Needs["NETLink`"]
InstallNET[];

NETTypeInfo["System.IO.Ports.SerialPort"]

ser = NETNew["System.IO.Ports.SerialPort","COM8",9600]
ser@Open[]

Graphics[Button[{Blue,Rectangle[{1,-2},{3,1}],Blue,Polygon[{{0,0},{2,2},{4,0}}]},ser@Write["A"]],ImageSize->{200,200}]
Graphics[Button[{Red,Rectangle[{1,2},{3,0}],Red,Polygon[{{0,0},{2,-2},{4,0}}]},ser@Write["B"]],ImageSize->{200,200}]