예제 #1
0
        public static void Main()
        {
            _ftdi = new FTDIClick(Hardware.SocketOne);

            _ftdi.DataReceived += Ftdi_DataReceived;
            _ftdi.Listening     = true;

            _ftdi.SendData(Encoding.UTF8.GetBytes("Hello world !"));

            Thread.Sleep(Timeout.Infinite);
        }
예제 #2
0
        public static void Main()
        {
            try
            {
                _ftdi = new FTDIClick(Hardware.SocketOne);

                _ftdi.DataReceived += _ftdi_DataReceived;
                _ftdi.Listening     = true;

                _ftdi.SendData(Encoding.UTF8.GetBytes("Hello world !"));
            }
            catch (PinInUseException)
            {
                Debug.Print("Error accessing the FTDI Click board");
            }

            Thread.Sleep(Timeout.Infinite);
        }