AigamoControl.ArduinoDevice.Read C# (CSharp) Method

Read() public method

public Read ( ) : Task
return Task
        public async Task<byte[]> Read()
        {
            uint bytesRead;
            do
            {
                bytesRead = await _DeviceReader.LoadAsync(1024);
            }
            while (bytesRead <= 0);

            var value = new byte[bytesRead];
            _DeviceReader.ReadBytes(value);

            return value;
        }