Exemplo n.º 1
0
        public static void IdentifyInteface(string portName)
        {
            var port = new SerialPortWrapper(portName);

            if (!port.Open())
            {
                Console.WriteLine("Failed to open specified port. Exiting.");
                return;
            }

            port.WriteByte(I2CCommands.IDENT);
            var size = port.ReadByte();

            Console.WriteLine(port.ReadString(size));
        }