MATLAB Support Package for Arduino (aka ArduinoIO Package) (Scripts) Publisher's description
MATLAB Support Package for Arduino (also referred to as "ArduinoIO Package") allows you to communicate with an Arduino Uno or Duemilanove over a serial port
Arduino (www.arduino.cc) is a low-cost open-source electronics prototyping platform.
MATLAB Support Package for Arduino (also referred to as "ArduinoIO Package") allows you to communicate with an Arduino Uno or Duemilanove over a serial port. It consists of a MATLAB API on the host computer and a server program that runs on the Arduino. Together, they allow you to access Arduino analog I/O, digital I/O, and motor shield from the MATLAB command line.
The Support Package also includes Simulink blocks for communicating with the Arduino.
For more information about the Support Package, see:
For Simulink blocks that support code generation, see:
%-- connect to the board
a = arduino('COM9')
%-- specify pin mode
%-- digital i/o
a.digitalRead(4) % read pin 4
a.digitalWrite(13,0) % write 0 to pin 13
%-- analog i/o
a.analogWrite(9, 155) % write 155 to analog pin 9
%-- motor shield
a.motorRun(4, 'forward') % run motor forward
a.servoWrite(1, 175); % move servo#1 to 175 deg position
a.stepperStep(1, 'forward', 'double', 100); % move stepper motor
%-- close session
System Requirements:MATLAB 7.10 (2010a)
Program Release Status: New Release
Program Install Support: Install and Uninstall