I have Netduino Mini
Is it possible to make use of the same comport of Netduino Mini to download firmware and for debugging?
I can deploy my example successfully on first attempt.
But the second time around the device is hung
As you can see below I close comport after sending test byte - I was hoping that after closing the port the comport will become available again.
using System; using System.Threading; using System.IO.Ports; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.NetduinoMini; namespace NetduinoMiniApplication1 { public class Program { public static void Main() { var serialPort = (SerialPort)null; Thread.Sleep(1000); var bytes = new byte[] { 0x31 }; serialPort = new SerialPort("COM2", 9600, Parity.None, 8, StopBits.One);//" COM2" RS232 Pin 1,2 serialPort.Open(); serialPort.Write(bytes, 0, 1); serialPort.Close(); while (true) { Thread.Sleep(5000); } } } }
Many thanks
Nissim
Edited by Nissim, 12 September 2011 - 07:22 AM.
Added [code] tags