Skip to content

Instantly share code, notes, and snippets.

@misternay
Last active October 23, 2017 09:52
Show Gist options
  • Save misternay/fff97e4d71d2c1318cac5d0de21c1de4 to your computer and use it in GitHub Desktop.
Save misternay/fff97e4d71d2c1318cac5d0de21c1de4 to your computer and use it in GitHub Desktop.
serial Arduino
String[] ports = SerialPort.GetPortNames();;//เก็บพอร์ตที่เชื่อมต่อนะครับ
SerialPort port = new SerialPort("COM4", 9600, Parity.None, 8, StopBits.One);
port.DataReceived += port_Data;
port.Open();
port.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment