Hello,
Please find the answer attached below. If the answer has helped you
please give a thumbs up rating. Thank you and have
a nice day!
NOTE: The following Matlab code assumes you have the arduino toolbox installed and have a working Arduino connected to any port
********** Matlab Code *********
%Create an arduino object, and include the ShiftRegister
library.
a = arduino('COM4','Uno','Libraries','ShiftRegister')
%Create shift register object, specifying the connected data pin,
clock pin, load pin, and clock enable pin.
dataPin = 'D11';
clockPin = 'D8';
loadPin = 'D9';
clockEnablePin = 'D10';
register =
shiftRegister(a,'74HC165',dataPin,clockPin,loadPin,clockEnablePin)
*************************************************************
PS: Please do not forget the thumbs
up!!
Get Answers For Free
Most questions answered within 1 hours.