Communicate with Arduino via COM4 [closed]

2

I created a code in C # to communicate with the Arduino one. It has to pass me which tag passed the rfid reader and show the value in a textbox.

I added the serialport1.

Code:

        serialPort1.Open();
        string entrada = serialPort1.ReadLine();
        serialPort1.Close();
        txtIDTag.Text = entrada;

Error when I run:

An unhandled exception of type 'System.UnauthorizedAccessException' occurred in System.dll

Additional information: Port 'COM4' does not exist.

    
asked by anonymous 01.04.2017 / 23:13

0 answers