using System;
using System.IO.Ports;
public class Program
{
public static void Main()
SerialPort sp;
sp= new SerialPort("COM3",115200,Parity.None,8);
sp.Open();
Console.Foreground=Console.Color.Green;
Console.keyInfo k=Console.ReadKey();
byte t;
t= (Byte) k.[char];
Byte[]tosend;
tosend= new Byte[1];
tosend[0]=t;
sp.write(tosend,0,1);
Byte r= ReadByte();
Console.WriteLine("llego", + r.tostring());
Console.ReadKey();
}