Arduinoとの連携

Needs["NETLink`"]
InstallNET[];

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

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

NETNew["System.IO.Ports.SerialPort","COM10",9600]

Button["BLUE On",ser@Write["B"]]
Button["YELLOW On",ser@Write["Y"]]
Button["RED On",ser@Write["R"]]
Button["Stop Program",ser@Close[]]