using System; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware.Netduino; using System.Threading; using Microsoft.SPOT; using System.IO.Ports; namespace SerialPortLearn { public class Program { static OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); static SerialPortHelper serialPortHelper1 = new SerialPortHelper(); static SerialPortHelper serialPortHelper2 = new SerialPortHelper(SerialPorts.COM2, 9600, Parity.None, 8, StopBits.One); public static void Main() { while (true) { string line = serialPortHelper2.ReadLine(); if (line.Length > 0) { led.Write(true); serialPortHelper1.PrintLine("Leido: " + line); Debug.Print("Leido: " + line); } } } } }I'm able to write in UART, but reading method is not working.
Any idea? Thanks!!