Created
February 21, 2015 08:29
C#にてシリアルポートからの通信を受信する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args){ | |
SerialPort sPort = new SerialPort("COM3"); | |
sPort.BaudRate = 9600; | |
sPort.Open(); | |
while (true){ | |
string myData = sPort.ReadLine(); | |
Console.WriteLine(myData); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment