%% Read Data from Device
% Create a connection to a serial port device using serialport. You can also connect to a Bluetooth device using bluetooth or a TCP/IP client using tcpclient.

dev = serialport("COM3",9600);

% Read five values of uint32 data. These five values at four bytes each are a total of 20 bytes.

data = read(dev,5,"uint32");

% Copyright 2020 The MathWorks, Inc.