Hi,
Awaiting my Spider and Reaper boards.
Meanwhile, tried a small serial port read / write program with NETMF.
Referred to this doc. https://www.ghielectronics.com/docs/15/uart-serial
VS 2013, .NETMF 4.3 (QFE2), Gadgeteer core, GHI NETMF SDK 2015 R1 Pre-release 4 - all installed.
A simple debug write is running ok.
Now tried this code :
public static void Main()
{
Debug.Print(“HELLO THERE, MONKEY BOY!”);
//int txCount;
SerialPort liftPort = new SerialPort("COM3,115200");
string txData = "HELLO THERE, MONKEY BOY!\r\n";
byte[] txBuf = Encoding.UTF8.GetBytes(txData);
int rxCount;
int rxReadBytes;
liftPort.Open();
liftPort.Write(txBuf, 0, txData.Length);
Thread.Sleep(100);
rxCount = liftPort.BytesToRead;
if (rxCount > 0)
{
byte[] rxBuf = new byte[rxCount];
rxReadBytes = liftPort.Read(rxBuf, 0, rxCount);
Debug.Print(rxBuf.ToString());
}
}
Debug transport : Emulator, Device = Microsoft Emulator.
An exception : Invalid serial port name, is thrown,
at this line : SerialPort liftPort = new SerialPort(“COM3,115200”);
Note : I have a working COM3 in my PC.
Can NETMF UART program be run with Emulator like this ?
Please correct.