Take out a wire from it and connect with Anode/positive leg of LED in Bread Board3. From the negative leg of LED, connect one leg of 220 ohm resistor.4.
Place the other leg of resistor to the Ground wire from the Arduino Board. Place Analog input block to a new model. Set the input pin you want to get a signal at by going into the properties of that block. Also the sampling time for input signal. (Figure 10).
Take a scope form sink library under the Simulink library and place in the same model for observation in input signal as graph. Also place a gain block for magnification of the graph in MATLAB. (Figure 11)Figure 10: Arduino Analog pin configurationFigure 11 below, shows simple model for Analog input of Arduino with MATLAB i.e.
Matlab Support Package For Arduino Hardware Free Download
Arduino as External mode of operation with real time observation and record to the MATLAB. Also showing steps for External mode.
Simulink And Arduino
First Click on the drop down menu in top middle of option bar of MATLAB and select External in it. (Figure 11 (1)).
As we want for infinite time so, write inf for running it in external mode infinite time. (Figure 11 (2)).Figure 11: Arduino MATLAB in External mode.
Figure 12: Hardware Configuration for Arduino in External Mode (A Simple model)In Figure 12, the number;. 1 (red wire) shows the +5V probe from the Arduino and the leg of potentiometer connected.
2 (black wire) is the ground (GND/0V) wire from Arduino connected with Potentiometer. 3 is three legged 1k ohm potentiometer. 4 (blue wire) is signal wire to the Analog pin A4 of Arduino.The video below explains all the same. Arduino in external mode with MATLAB and same system in stand-alone mode.