8.3 Arduinoとの連携

Needs["NETLink`"]
InstallNet　[];

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

ser@Open[]

«NETObject[System.IO.Ports.SerialPort]»


Button["Sensor On" , ser@Write["S"]]

Button["Sensor Off" , ser@Write["E"]]