Example 3: MATLAB
The third example below shows how it is possible to install hardware support for Arduino into Matlab using the hardware support package and then directly control the output pin connected to the Extender.
Download and install Arduino Hardware support package on MATLAB.
Connect the Arduino board to the PC. To establish a connection between MATLAB and Arduino boards, the following command can be used from MATLAB:
The arduino support package can control the arduino in multiple different ways. For this example we are using Digital pin 9 and using the writeDigitalPin command. See example below.
This will create a rising edge which will trigger the extender port. You can incorporate this into your code.
Last updated