Simulinking with an Arduino Uno



Adafruit’s Anuja Apte has penned an informative tutorial describing how to program an Atmel-based Arduino Uno board (ATmega328) using Simulink. 

For the uninitiated, Simulink can best be described as a block diagram environment for multi-domain simulation and model-based design. It supports automatic code generation, along with continuous test and verification of embedded systems.

In terms of Arduino, Simulink is used to develop and verify algorithms for control system and robotics applications. The algorithms are then implemented on the Arduino board as standalone applications.

To kick off Adafruit’s tutorial, Makers will need to purchase MATLAB (R2013a or later version). Aside from the Arduino Uno, required hardware components include a small breadboard, 220 Ohm resistor, LED, connecting wires and USB connector. 

Using the USB connector, connect the Uno to a computer loaded with MATLAB and Simulink. Install a compiler, configure in MATLAB and set up the Simulink support package for Arduino.

Ready?

Follow the image above to build a simple circuit that connects an LED to pin 9 of Arduino Uno.

Done?

“Enter arduinouno_gettingstarted at the MATLAB command prompt to open a model that uses a Pulse Generator block to create a signal that varies between zero and one every second. Double-click the Pulse Generator block to explore its pre-configured parameters,” Apte explained.

“The Digital Output block is set up to send the output of the Pulse Generator to pin 9 of the Arduino Uno. Double-click the block to explore its pre-configured parameters. You are now ready to program your Arduino Uno!”

After preparing the model to run on the Uno, make sure the board is connected to a PC via USB cable. Select tools > run on target hardware > and run.

Done?

The LED attached to pin 9 should blink one time every second.

Interested in learning more about Simulinking with an Atmel-based Arduino Uno? You can check out Adafruit’s in-depth tutorial here, which offers 
a detailed step-by-step guide to setting up compiler support, configuring Simulink support packages (for Arduino) and creating your own models.

1 thought on “Simulinking with an Arduino Uno



  1. esl activities

    Hi would you mind letting me know which hosting
    company you’re using? I’ve loade your blog in 3 different internet browsers and
    I must say this blo loads a lot faster then most. Can you recommend a good web hosting
    provider at a reasonable price? Manny thanks, Iappreciate it!

    Like

    Reply

Leave a comment