Witam. Chcę odbierać dane z serial monitor wysyłanego z Arduino , gdzie mi wyświetla ciągle tekst "Data Loop =0..n"
W tym celu uruchomiłem kod w c# oto on :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO.Ports;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
SerialPort port = new SerialPort();
port.BaudRate = 9600;
port.PortName = "COM5";
port.Open();
while (true)
{
string data_rx = port.ReadLine();
Console.WriteLine(data_rx);
}
}
}
}
Zamiast odbierać dane to mam czarny ekran serial monitor , w komunikacji powinno być wszystko okej bo zanjduje ten port COM5 i się łączy ale nie odczytuje już tego tekstu .. jak to prawidłowo zrobić aby działało ?