Introduction about MATLAB with Arduino:-

In Today’s world many engineers, scientists, and researcher use MATLAB  language to explore their designs in Actual world, but for implementing their ideas they must translate their high-level MATLAB algorithms into the low-level language of C. For achieving MATLAB to C workflow they use Embedded MATLAB coder which brings exploration and implementation together.

The Gap between Concept and Implementation:-

To build an embedded system, engineers typically follow below Algorithm:

  • Develop in MATLAB
  • Translate to C
  • Compile for the target hardware
  • Verifying at each step.

MATLAB Code Generation Toolchain:-

The Beginning is always MATLAB; the origin of MATLAB is Control design. Consider you have your Controller Design with your MATLAB and you want to generate a C code based on this pure MATLAB script. So for this you can use the MATLAB coder and the embedded coder. Then we can generate C/C++ code from the MATLAB script and your code can be use for the Desktop Projects or as well as microcontroller applications. Like your ARM code integrated into your project in the IDE Compile and it will run on the Hardware. So then your next step is Simulink and State flow. So at this stage of MATLAB you don’t need any of IDE compilers you need only a Hardware support packages for Simulink and State flow. Then you can connect your Arduino,  Raspberry pi with MATLAB and do the Projects accordingly.

How to Install this Support Packages

  1. Click on ADD-ons from MATLAB Software
  2. Get Hardware Support Packages
  3. Install form internet—Click on next
  4. Select the package which you want install
  5. Give your Math works Login id and Password ,wait until install
  6. After installing connect the Hardware for Testing connection
  7. Wait until Establishing Connection (it will take few seconds)
  8. After connecting write a MATLAB Script and run in Hardware