using System;
//using OpenNETCF.IO.Ports;
using System.IO.Ports;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
SerialPort port = new SerialPort("COM43", 115200, Parity.None, 8, StopBits.One);
port.Open();
System.Threading.Thread.Sleep(1000); // waiting for Arduino reset
for (int i = 0; i < 1000; i++)
{
Console.WriteLine(port.BytesToRead); // it write on the console only zeros, so no data is received
System.Threading.Thread.Sleep(100);
}
port.Close();
}
}
}