# Set up and Blink - MATLAB and Simulink with Arduino

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/024/295/medium800/learn_arduino_ArduinoOverview.png?1428093334)

You can use MATLAB to communicate with an Arduino board using MATLAB Support Package for Arduino.

You can program an Arduino board using Simulink Support Package for Arduino. The support package automatically generates code from your &nbsp;Simulink model that then runs on the Arduino board (in a click of a button).&nbsp;

This tutorial covers a step-by-step guide to:

MATLAB Support Package&nbsp;

1. Set up the MATLAB support package for Arduino&nbsp;
2. Send commands from MATLAB to Arduino to blink an LED

Simulink Support Package

1. Set up the Simulink support package for Arduino&nbsp;
2. Build a simple Simulink model for controlling pins on the Arduino
3. Generate, download and run code on the Arduino to blink an LED

This is the first tutorial in a series on using MATLAB and Simulink to program an Arduino. In this tutorial Arduino Due is used as an example, however the same steps can be used for other boards like Uno, Mega 2560 etc.&nbsp;

http://www.youtube.com/watch?v=9ttIZoUXCKY

- [Next Page](https://learn.adafruit.com/how-to-use-matlab-and-simulink-with-arduino/parts-and-software.md)

## Featured Products

### Super Bright Red 5mm LED (25 pack)

[Super Bright Red 5mm LED (25 pack)](https://www.adafruit.com/product/297)
Need some really bright LEDs? We are big fans of these clear red LEDs, in fact we use them exclusively in our kits. They are very bright and have about 20degree LED beam. They go easily into a breadboard and will add that extra zing to your project.

- Pack of 25 clear red...

In Stock
[Buy Now](https://www.adafruit.com/product/297)
[Related Guides to the Product](https://learn.adafruit.com/products/297/guides)
### Half Sized Premium Breadboard - 400 Tie Points

[Half Sized Premium Breadboard - 400 Tie Points](https://www.adafruit.com/product/64)
This is a cute, half-size breadboard with&nbsp;400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm&nbsp;x 5.5cm&nbsp;with a standard double-strip in the middle and two power rails on both sides.&nbsp;You can pull the power rails off easily to make the breadboard as...

In Stock
[Buy Now](https://www.adafruit.com/product/64)
[Related Guides to the Product](https://learn.adafruit.com/products/64/guides)
### Breadboarding wire bundle

[Breadboarding wire bundle](https://www.adafruit.com/product/153)
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent wires" that are sometimes sold with breadboards, and faster than stripping your own solid core wires. Makes...

In Stock
[Buy Now](https://www.adafruit.com/product/153)
[Related Guides to the Product](https://learn.adafruit.com/products/153/guides)
### USB Patterned Fabric Cable - A/MicroB

[USB Patterned Fabric Cable - A/MicroB](https://www.adafruit.com/product/2008)
Oooh it's so soft! And that beautiful&nbsp;pattern! If you have to have visible cables&nbsp;then you might as well have the nicest fabric bound cable with a eye-catching snake-like pattern. &nbsp;That's why we now carry this standard A to micro-B USB cable&nbsp;for USB 1.1 or 2.0....

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2008)
[Related Guides to the Product](https://learn.adafruit.com/products/2008/guides)
### Arduino Due - assembled

[Arduino Due - assembled](https://www.adafruit.com/product/1076)
Put your Arduino project on TURBO mode with the high-speed, high-power Arduino Due! The Due cranks it up to 11 with an 84 MHz ARM core processor - 512K of FLASH storage! 96K of RAM! Both USB client and host! The Arduino Due is ideal for those who want to build projects that require high...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1076)
[Related Guides to the Product](https://learn.adafruit.com/products/1076/guides)

## Related Guides

- [Multi-tasking the Arduino - Part 1](https://learn.adafruit.com/multi-tasking-the-arduino-part-1.md)
- [Arduino Lesson 12. LCD Displays - Part 2](https://learn.adafruit.com/adafruit-arduino-lesson-12-lcd-displays-part-2.md)
- [Wireless Game Show Poppers for the Classroom!](https://learn.adafruit.com/wireless-game-show-poppers.md)
- [Micro:bit with Arduino](https://learn.adafruit.com/use-micro-bit-with-arduino.md)
- [Arduino Lesson 1. Blink](https://learn.adafruit.com/adafruit-arduino-lesson-1-blink.md)
- [Arduino Lesson 10. Making Sounds](https://learn.adafruit.com/adafruit-arduino-lesson-10-making-sounds.md)
- [Ladyada's Learn Arduino - Lesson #2](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-2.md)
- [Ladyada's Learn Arduino - Lesson #1](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-1.md)
- [Memories of an Arduino](https://learn.adafruit.com/memories-of-an-arduino.md)
- [Arduino Lesson 5. The Serial Monitor](https://learn.adafruit.com/adafruit-arduino-lesson-5-the-serial-monitor.md)
- [Arduino Lesson 3. RGB LEDs](https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds.md)
- [Programmable 12v Outdoor Cafe Lights](https://learn.adafruit.com/programmable-12v-outdoor-cafe-lights.md)
- [Arduino Lesson 16. Stepper Motors](https://learn.adafruit.com/adafruit-arduino-lesson-16-stepper-motors.md)
- [Ladyada's Learn Arduino - Lesson #0](https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-0.md)
- [Arduino Lesson 13. DC Motors](https://learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors.md)
