Hardware Interface | Matlab & Arduino



How to interface hardware
& Read analog value in MATLAB using Arduino UNO,
this blog will explain the downloading &
Installing of hardware support package in MATLAB.







For Installing Hardware support package in MATLAB follow simple steps-
  1. Open Matlab
  2. Go to Home Panel
  3. Take your cursor to Add on & Click.
  4. Choose get Hardware Support Packages.
  5. Select an action, Use Install from Internet >> Next
  6. Choose Support Package >> Arduino Uno (For Arduino)
  7. Then click Next (Your support Package will Install)
  8. Click Finish

These are steps to add hardware support packages to your MATLAB

Now its time to Interface arduino, up to now your hardware support packages are installed, connect your Arduino to your Laptop/ PC.

Let us take a variable >>a= arduino (hit enter)

a = 

  arduino with properties:

                    Port: 'COM3'
                   Board: 'Uno'
           AvailablePins: {'D2-D13', 'A0-A5'}
               Libraries: {'I2C', 'SPI', 'Servo'}

This you will see, Port could be different, it could be any.

Now we will see how to read voltage from arduino Analog Pins (A0-A5)
For Reading Voltage you must connect your voltage input pin to (A0-A5) which is your analogwrite and another pin to ground, max voltage you can see through analog pins in arduino is 5V

Then you have to write a CODE.



Do not forget to write Analog & COM port in the code.
This is how you can read analog input value through MATLAB and Interface your any hardware to MATLAB.

Video of this blog will be uploaded soon, Like Subscribe and Comment.

Comments