rn

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

MATLAB® Support Package for Arduino® Hardware

Release Notes
How to Contact MathWorks

Latest news: www.mathworks.com

Sales and services: www.mathworks.com/sales_and_services

User community: www.mathworks.com/matlabcentral

Technical support: www.mathworks.com/support/contact_us

Phone: 508-647-7000

The MathWorks, Inc.


1 Apple Hill Drive
Natick, MA 01760-2098
MATLAB® Support Package for Arduino® Hardware Release Notes
© COPYRIGHT 2014–2022 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied
only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form
without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through
the federal government of the United States. By accepting delivery of the Program or Documentation, the government
hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer
software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014.
Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain
to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government) and shall
supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is
inconsistent in any respect with federal procurement law, the government agrees to return the Program and
Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be
trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for
more information.
Contents

R2022b

Manage Arduino Libraries and Interface with I2C, SPI, and Serial
Communication devices Using the Arduino Explorer App . . . . . . . . . . . 1-2

Support for Servo and Encoder Peripherals Connected to Arduino-


compatible ESP32 Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Read barometric air pressure and ambient temperature from BMP280


pressure sensors on Arduino hardware . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Measure linear acceleration and temperature from LIS3DH


accelerometer sensors on Arduino hardware . . . . . . . . . . . . . . . . . . . . . 1-2

Support for Arduino-compatible Seeeduino boards . . . . . . . . . . . . . . . . . . 1-2

Arduino IDE version update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

R2022a

Support for Arduino-compatible ESP32 boards . . . . . . . . . . . . . . . . . . . . . 2-2

Read data from ICM-20948 sensor on Arduino hardware . . . . . . . . . . . . . 2-2

Read acceleration from ADXL34x family of accelerometers on Arduino


hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

Improved Data Acquisition from Sensors Connected to Arduino hardware


.......................................................... 2-2

Arduino IDE version update (July 2022, Version 22.1.2) . . . . . . . . . . . . . . 2-2

R2021b

Connect and Control Arduino board using the Arduino Explorer App . . . 3-2

Read data from APDS9960 sensor on Arduino hardware . . . . . . . . . . . . . . 3-2

iii
Wirelessly connect to Arduino boards over Bluetooth . . . . . . . . . . . . . . . . 3-2

Functionality being changed or removed . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2


The property Pins of SPI object has been changed . . . . . . . . . . . . . . . . . . 3-2
mkrMotorCarrier function has been removed . . . . . . . . . . . . . . . . . . . . . . 3-2
MKRMotorCarrier library has been removed . . . . . . . . . . . . . . . . . . . . . . 3-2
Adafruit\BNO055 library has been removed . . . . . . . . . . . . . . . . . . . . . . . 3-2

MBED package version update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Instrument Control Toolbox dependency removal . . . . . . . . . . . . . . . . . . . 3-3

Digital pin support for Arduino Leonardo and Arduino Micro . . . . . . . . . 3-3

Enhancements to Drawing Robot Project . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Arduino IDE version update (April 2022, Version 21.2.2) . . . . . . . . . . . . . 3-3

R2021a

Read data from LSM6DS sensors on Arduino hardware . . . . . . . . . . . . . . . 4-2

Read humidity from HTS221 sensor on Arduino hardware . . . . . . . . . . . . 4-2

Read air pressure from LPS22HB sensor on Arduino hardware . . . . . . . . 4-2

Support for Arduino Nano 33 BLE and Nano 33 BLE Sense boards . . . . . 4-2

Integration of Arduino Engineering Kit Rev 2 Project Files . . . . . . . . . . . 4-2

Arduino IDE version update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

R2020b

Read BNO055 Sensor Output Data in NDOF or AMG Operating Mode . . . 5-2

Support for Arduino Nano Motor Carrier . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

Enable code generation of MATLAB Arduino functions inside a MATLAB


function block for IMU sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

Enable code generation of MATLAB Arduino functions inside a MATLAB


function block for serial peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2


mkrMotorCarrier function will be removed in a future release . . . . . . . . . 5-2

iv Contents
MKRMotorCarrier library will be removed in a future release . . . . . . . . . . 5-2
addon to create connection to BNO055 will be removed in a future release
...................................................... 5-2
Adafruit\BNO055 library will be removed in a future release . . . . . . . . . . . 5-2

R2020a

Fixed SPI high precision data error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Arduino IDE Version Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Support for CAN shields on Arduino Hardware . . . . . . . . . . . . . . . . . . . . . 6-2

Support for Arduino Nano 33 IoT board . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Support for Arduino MKR Motor Carrier . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Read GPS Data from GPS Receiver Connected to Arduino Hardware . . . . 6-2

Use BNO055 Sensor with Sensor Fusion and Tracking Toolbox, and
Navigation Toolbox to Estimate Orientation . . . . . . . . . . . . . . . . . . . . . . 6-2

Enable Code Generation of MATLAB Arduino Functions Inside a MATLAB


Function Block for I2C and SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Functionality being changed or removed . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3


The i2cdev and spidev functions is no longer supported . . . . . . . . . . . . . . 6-3
The property Pins of servo object is no longer supported . . . . . . . . . . . . . 6-3
The class arduinoio.LibraryBase is no longer supported . . . . . . . . . . . . . . 6-3
MATLAB support for Adafruit Bluefruit EZ-Link Shield and Programmer is
no longer supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

Support for Arduino Nano Motor Carrier (September 2020, Version


20.1.1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3

R2019b

Build Standalone Applications for Arduino Hardware from MATLAB


Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

Read Data From BNO055 IMU Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

Interface a Serial Device with Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

Support for hexadecimal and binary literals (October 2019, Version


19.2.1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

v
Fixed Bluetooth Connection for Arduino Leonardo and Arduino Micro
(October 2019, Version 19.2.1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

Arduino IDE Version Update to Support macOS 10.15 Catalina (February


2020, Version 19.2.2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

R2019a

Functionality being changed or removed . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2


The i2cdev and spidev functions will be removed in a future release . . . . . 8-2
The property Pins of servo object will be removed in a future release . . . . 8-2
The class arduinoio.LibraryBase will be removed in a future release . . . . . 8-2
MATLAB support for Adafruit Bluefruit EZ-Link Shield and Programmer will
be removed in a future release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
MATLAB support for Arduino hardware boards has been removed . . . . . . 8-2

Connect to Arduino MKR WiFi 1010 board over a wireless network


(Introduced April 2019, Version 19.1.1) . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

Updated Release Note Entry (May 2019, Version 19.1.2) . . . . . . . . . . . . . . 8-2

Inaccurate Byte Ordering Corrected (October 2019, Version 19.1.3) . . . . 8-3

R2018b

Bug Fixes

R2018a

Bug Fixes

R2017b

Arduino Setup UI: Setup a connection to your Arduino board over USB,
Bluetooth, or Wi-Fi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2

Arduino Plug-In Detection: Discover available Arduino support and


examples when plugging a compatible Arduino board . . . . . . . . . . . . . 11-2

vi Contents
R2017a

Read from quadrature encoders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2

Wirelessly connect to Arduino MKR1000 board over WiFi . . . . . . . . . . . 12-2

Wirelessly connect to Arduino boards over Bluetooth (Introduced April


2017) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2

R2016b

Read from and write to shift registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2

Support Package Installation via Add-On Explorer: Install, manage, and


update support packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2

Expanded Arduino IO SDK to support background operations . . . . . . . . 13-2

R2016a

Bug Fixes

R2015b

Build custom add-ons to interface with additional hardware and software


libraries (Introduced January 2016) . . . . . . . . . . . . . . . . . . . . . . . . . . . 15-2

Ability to specify clock rate of SPI connection (Introduced January 2016)


......................................................... 15-2

R2015a

Support for Arduino Leonardo and other boards with MATLAB Support
Package for Arduino Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2

New configurePin function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16-2

vii
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 16-2

R2014b

Support package for Arduino hardware . . . . . . . . . . . . . . . . . . . . . . . . . . 17-2

viii Contents
1

R2022b

Version: 22.2.0

New Features
R2022b

Manage Arduino Libraries and Interface with I2C, SPI, and Serial
Communication devices Using the Arduino Explorer App
The Arduino Explorer app, which was introduced in R2021b release of MATLAB Support Package for
Arduino Hardware, now lets you interface the Arduino board with I2C, SPI, and Serial communication
devices, read, write, and decode data read from these interfaces, and visualize the data using Plot
and Log options. The app also supports managing the libraries installed on the Arduino board.

Support for Servo and Encoder Peripherals Connected to Arduino-


compatible ESP32 Boards
MATLAB Support Package for Arduino Hardware now supports communicating with servo and
encoder peripherals connected to an Arduino-compatible ESP32 board. You can use the existing
objects servo and rotaryEncoder to connect to those devices and use the corresponding functions
to configure them.

Read barometric air pressure and ambient temperature from BMP280


pressure sensors on Arduino hardware
The MATLAB Support Package for Arduino Hardware now provides a new object, bmp280, that you
can use to connect to the BMP280 sensor on the Arduino hardware I2C bus. You can read barometric
air pressure and ambient temperature by using the functions already available in the support
package.

Measure linear acceleration and temperature from LIS3DH


accelerometer sensors on Arduino hardware
The MATLAB Support Package for Arduino Hardware now provides a new object, lis3dh, that you
can use to connect to the LIS3DH sensor on the Arduino hardware I2C bus. You can read linear
acceleration and temperature by using the functions already available in the support package.

Support for Arduino-compatible Seeeduino boards


The MATLAB Support Package for Arduino Hardware now supports communicating with Arduino-
compatible Seeduino boards over USB. You can use the arduino object to connect to either
Seeeduino V4.2 or Grove Beginner Kit for Arduino (powered by Seeeduino Lotus) and then write and
read data to and from connected peripherals.

Arduino IDE version update


MATLAB Support Package for Arduino Hardware now installs Arduino IDE 1.8.19 as part of the
support package installation.

1-2
2

R2022a

Version: 22.1.0

New Features
R2022a

Support for Arduino-compatible ESP32 boards


The MATLAB Support Package for Arduino Hardware now supports communicating with Arduino-
compatible ESP32 boards over USB or WiFi connection. The Hardware Setup workflow (launched
using arduinosetup) enables the configuration of ESP32-DevKitV1 or ESP32-DevKitC boards
connected to the PC, and downloads the required third-party library required to setup the board. For
details, see Set up and Configure ESP32 Hardware.

After the Hardware Setup is completed, you can use the arduino function to connect to the ESP32
board and then write and read data to and from peripherals such as I2C, SPI or Serial ports of the
board, using the associated device functions.

Read data from ICM-20948 sensor on Arduino hardware


The MATLAB Support Package for Arduino Hardware now provides a new object, icm20948, that you
can use to connect to an ICM-20948 sensor on the Arduino hardware I2C bus. You can read
acceleration, angular velocity, and magnetic field in all three dimensions, and temperature from the
ICM-20948 sensor by using the functions already available in the support package.

Read acceleration from ADXL34x family of accelerometers on Arduino


hardware
The MATLAB Support Package for Arduino Hardware now provides a new object, adxl345, that you
can use to connect to the ADXL345, ADXL343, ADXL344, or ADXL346 sensor on the Arduino
hardware I2C bus. You can read acceleration in all three dimensions by using the functions already
available in the support package.

Improved Data Acquisition from Sensors Connected to Arduino


hardware
Starting R2022a, you can use the read function in MATLAB Support Package for Arduino Hardware
to acquire data at 200Hz from IMUs connected to Arduino boards. The Sensors page lists a wide
variety of sensors that support data acquisition at high rates.

Arduino IDE version update (July 2022, Version 22.1.2)


MATLAB Support Package for Arduino Hardware now installs Arduino IDE 1.8.19 as part of the
support package installation.

2-2
3

R2021b

Version: 21.2.0

New Features

Bug Fixes

Compatibility Considerations
R2021b

Connect and Control Arduino board using the Arduino Explorer App
The MATLAB Support Package for Arduino Hardware now supports an Arduino Explorer app.

Using this app, you can:

• Setup the Arduino board


• Connect to an Arduino board over USB, Bluetooth®, and WiFi
• Configure, read from, and write to Arduino pins
• Visualize data from Arduino pins
• Record and save data from Arduino pins to the MATLAB workspace
• Analyze the recorded data
• Generate equivalent MATLAB code

Read data from APDS9960 sensor on Arduino hardware


The MATLAB Support Package for Arduino Hardware enables you to read gesture, proximity, and
measures clear light and color (RGB) values from the APDS9960 sensors connected to Arduino
hardware. For more information, see apds9960.

Wirelessly connect to Arduino boards over Bluetooth


MATLAB Support Package for Arduino Hardware enables you to wirelessly connect to and
communicate with the Arduino Nano 33 BLE, Nano 33 BLE Sense, Nano 33 IoT, or MKR1010 boards
over Bluetooth 4.0.

Functionality being changed or removed


The property Pins of SPI object has been changed
Warns

The MOSIPin and MISOPin properties of the SPI object have been changed to SDOPin and SDIPin.

mkrMotorCarrier function has been removed


Errors

As of R2021b, the mkrMotorCarrier function will throw a error message. This function has been
removed. Use the motorCarrier object instead to connect to the MKR Motor Carrier hardware.

MKRMotorCarrier library has been removed


Errors

As of R2021b, using the 'MKRMotorCarrier' library will throw a error message. This library has
been removed. Use the 'MotorCarrier' library instead when creating a connection to the Arduino
hardware using the arduino object.

Adafruit\BNO055 library has been removed


Errors

3-2
Starting R2021b, using the 'Adafruit\BNO055' library will throw a error message. This library has
been removed. See bno055 to create the connection to a BNO055 sensor.

MBED package version update


In the MATLAB Support Package for Arduino Hardware installation, the MBED package has been
updated to version 1.3.2. This removes the limitation on the number of bytes you can write to a
serial device.

Instrument Control Toolbox dependency removal


As of R2021b, connecting to an Arduino board using Bluetooth does not require you to install
Instrument Control Toolbox™.

Digital pin support for Arduino Leonardo and Arduino Micro


As of R2021b, you can use the digital pins D0 and D1 to connect to the Tone, DigitalInput,
DigitalOutput, Pullup, Servo, SPI, Interrupt, Ultrasonic, CAN, and Unset modes of
Arduino Leonardo and Arduino Micro boards

Enhancements to Drawing Robot Project


The Drawing Robot Project, which is part of the Arduino Engineering Kit project files that are
downloaded as part of the support package installation, now supports route optimization of the
robot’s drawing path. This enhancement reduces the total duration required by the robot to recreate
the image on the whiteboard.

Arduino IDE version update (April 2022, Version 21.2.2)


MATLAB Support Package for Arduino Hardware now installs Arduino IDE 1.8.19 as part of the
support package installation.

3-3
4

R2021a

Version: 21.1.0

New Features
R2021a

Read data from LSM6DS sensors on Arduino hardware


The MATLAB Support Package for Arduino Hardware enables you to read linear acceleration and
angular velocity along the x-, y-, and z- axes and temperature from the LSM6DS family of sensors
connected to Arduino hardware. You can use the support package with LSM6DS3, LSM6DS3H,
LSM6DSL, LSM6DSM, LSM6DSO, and LSM6DSR sensors.

Read humidity from HTS221 sensor on Arduino hardware


The MATLAB Support Package for Arduino Hardware now provides hts221 object that helps you to
read relative humidity and ambient temperature from an HTS221 sensor connected to Arduino
hardware.

Read air pressure from LPS22HB sensor on Arduino hardware


The MATLAB Support Package for Arduino Hardware now provides lps22hb object that helps you to
read barometric air pressure and ambient temperature from an LPS22HB sensor connected to
Arduino hardware.

Support for Arduino Nano 33 BLE and Nano 33 BLE Sense boards
Use the MATLAB Support Package for Arduino Hardware to connect to and communicate with the
Arduino Nano 33 BLE and Nano 33 BLE Sense boards. For more information, see arduino.

Integration of Arduino Engineering Kit Rev 2 Project Files


The MATLAB Support Package for Arduino Hardware now provides the Arduino Engineering Kit Rev
2 project files, as part of the support package installation. The two projects that use MATLAB
functions in the support package are Drawing Robot and Webcam Controlled Rover, which are
described in detail at https://engineeringkit.arduino.cc/. When you register for the kit, you get one-
year individual user MATLAB license that also includes additional products, which are required for
working with the project files.

The integration of the Arduino Engineering Kit Rev 2 project files in the support package helps you to
effectively use the functionality of Arduino Nano 33 IoT board and the Arduino Nano Motor Carrier,
with some additional software and hardware components. For more details, see Using Arduino
Engineering Kit Rev 2 with Pre-Configured Projects in Support Package.

Arduino IDE version update


MATLAB Support Package for Arduino Hardware now installs Arduino IDE 1.8.13 as part of the
support package installation.

4-2
5

R2020b

Version: 20.2.0

New Features

Compatibility Considerations
R2020b

Read BNO055 Sensor Output Data in NDOF or AMG Operating Mode


You can now configure the BNO055 sensor to output data in the NDOF or AMG operating mode. In
the NDOF operating mode, you can read calibrated values of acceleration, angular velocity, magnetic
field strength, orientation, and the calibration status of the sensor. In the AMG mode you can read
raw values of acceleration, angular velocity, and magnetic field strength. For more details, see
bno055.

Support for Arduino Nano Motor Carrier


Use the MATLAB Support Package for Arduino Hardware to control DC and servo motors connected
to a Nano motor carrier on an Arduino hardware in open-loop and closed-loop control using feedback
from encoders. For more details, see motorCarrier.

Enable code generation of MATLAB Arduino functions inside a MATLAB


function block for IMU sensors
You can now generate code for Arduino MATLAB functions inside a MATLAB function block for these
IMU sensors: MPU-9250, MPU-6050, LSM9DS1, and BNO055.

Enable code generation of MATLAB Arduino functions inside a MATLAB


function block for serial peripherals
You can now generate code for Arduino MATLAB functions inside a MATLAB function block for serial
peripherals.

Functionality being removed or changed


mkrMotorCarrier function will be removed in a future release
Warns

Starting R2020b, using the mkrMotorCarrier function will throw a warning message. This function
will be removed in a future release. Use the motorCarrier object instead to connect to the MKR
Motor Carrier hardware.

MKRMotorCarrier library will be removed in a future release


Warns

Starting R2020b, using the 'MKRMotorCarrier' library will throw a warning message. This library
will be removed in a future release. Use the 'MotorCarrier' library instead when creating a
connection to the Arduino hardware using the arduino object.

addon to create connection to BNO055 will be removed in a future release


Warns

Starting R2020b, using the addon object to create a connection to a BNO055 sensor will throw a
warning message. This object will be removed in a future release. Use the bno055 object instead to
connect to the BNO055 sensor on the Arduino hardware.

Adafruit\BNO055 library will be removed in a future release


Warns

5-2
Starting R2020b, using the 'Adafruit\BNO055' library will throw a warning message. This library
will be removed in a future release. See bno055 to create the connection to a BNO055 sensor.

5-3
6

R2020a

Version: 20.1.0

New Features

Compatibility Considerations
R2020a

Fixed SPI high precision data error


SPI high precision data was converted to little-endian format erroneously. This problem has now been
fixed.

Arduino IDE Version Update


MATLAB Support Package for Arduino Hardware has been updated to install Arduino IDE 1.8.10 as
part of the support package installation.

This allows you to work with the support package on macOS 10.15 Catalina.

Support for CAN shields on Arduino Hardware


Use the MATLAB Support Package for Arduino Hardware to read and write CAN messages to CAN
shields on the Arduino hardware.

Support for Arduino Nano 33 IoT board


Use the MATLAB Support Package for Arduino Hardware to connect and communicate with the
Arduino Nano 33 IoT board.

Support for Arduino MKR Motor Carrier


Use the MATLAB Support Package for Arduino Hardware to control DC, and servo motors, connected
to an MKR motor carrier on an Arduino hardware in open-loop and closed-loop control using feedback
from encoders.

Read GPS Data from GPS Receiver Connected to Arduino Hardware


The MATLAB Support Package for Arduino Hardware enables you to read GPS data from the GPS
receiver connected to an Arduino hardware.

Use BNO055 Sensor with Sensor Fusion and Tracking Toolbox, and
Navigation Toolbox to Estimate Orientation
You can read acceleration, angular velocity, and magnetic field up to 200Hz in the non-fusion mode of
the BNO055 IMU sensor connected to the Arduino hardware. To estimate orientation, you can use the
sensor with Sensor Fusion and Tracking Toolbox™, and Navigation Toolbox™.

Enable Code Generation of MATLAB Arduino Functions Inside a


MATLAB Function Block for I2C and SPI
In addition to the existing support of ADC, PWM, and Digital Read/Write, you can now generate code
for Arduino MATLAB functions inside a MATLAB function block for I2C and SPI.

6-2
Functionality being changed or removed
The i2cdev and spidev functions is no longer supported
Errors

Use device instead of i2cdev and spidev to connect to I2C or SPI devices on Arduino hardware .

The property Pins of servo object is no longer supported


Errors

Use the property Pin instead of Pins to get the pin number of the Arduino hardware and the
Adafruit® Motor Shield V2 for Arduino hardware to which the servo motor is connected. For more
information, see Connection to servo motor on Arduino and Connection to servo motor on Adafruit
Motor Shield V2 .

The class arduinoio.LibraryBase is no longer supported


Errors

Use the class matlabshared.addon.LibraryBase instead of arduinoio.LibraryBase for


deriving Arduino add-on libraries.

MATLAB support for Adafruit Bluefruit EZ-Link Shield and Programmer is no longer
supported
Errors

The support for Adafruit Bluefruit EZ-Link Shield and Programmer will be removed in R2020a.

Support for Arduino Nano Motor Carrier (September 2020, Version


20.1.1)
Use the MATLAB Support Package for Arduino Hardware to control DC and servo motors connected
to a Nano motor carrier on an Arduino hardware in open-loop and closed-loop control using feedback
from encoders. For more details, see motorCarrier.

6-3
7

R2019b

Version: 19.2.2

New Features
R2019b

Build Standalone Applications for Arduino Hardware from MATLAB


Programs
The MATLAB Support Package for Arduino Hardware enables you to build standalone applications
that run MATLAB programs to serially interface with Arduino hardware without having MATLAB
installed.

To use this feature, you must have access to the Arduino IDE.

Read Data From BNO055 IMU Sensor


The MATLAB Support Package for Arduino Hardware enables you to read acceleration, angular
velocity, magnetic field, and Euler angles along the axes of the BNO055 IMU sensor connected to the
Arduino hardware.

Interface a Serial Device with Arduino


The MATLAB Support Package for Arduino Hardware enables you to communicate with the serial
devices connected to the Arduino hardware.

Support for hexadecimal and binary literals (October 2019, Version


19.2.1)
You can now input hexadecimal or binary literals as:

• I2C device addresses to I2C device, and I2C shield addon while creating the device
• Input data to I2C write, writeRegister and readRegister, SPI writeRead, and Shift
Register write functions

Fixed Bluetooth Connection for Arduino Leonardo and Arduino Micro


(October 2019, Version 19.2.1)
In 19a, connecting Arduino Leonardo and Arduino Micro boards resulted in a test connection failure.
This is now fixed.

Arduino IDE Version Update to Support macOS 10.15 Catalina


(February 2020, Version 19.2.2)
MATLAB Support Package for Arduino Hardware, which installed Arduino IDE 1.8.8, did not work
with macOS 10.15 Catalina.

To fix this, from 19.2.2 onwards, the MATLAB Support Package for Arduino Hardware has been
updated to install Arduino IDE 1.8.10 as part of the support package installation.

7-2
8

R2019a

Version: 19.1.3

New Features

Compatibility Considerations
R2019a

Functionality being changed or removed


The i2cdev and spidev functions will be removed in a future release
Warns

Use device instead of i2cdev and spidev to connect to I2C or SPI devices on Arduino hardware .

The property Pins of servo object will be removed in a future release


Warns

Use the property Pin instead of Pins to get the pin number of the Arduino hardware and the
Adafruit Motor Shield V2 for Arduino hardware to which the servo motor is connected. For more
information, see Connection to servo motor on Arduino and Connection to servo motor on Adafruit
Motor Shield V2.

The class arduinoio.LibraryBase will be removed in a future release


Warns

Use the class matlabshared.addon.LibraryBase instead of arduinoio.LibraryBase for


deriving Arduino add-on libraries.

MATLAB support for Adafruit Bluefruit EZ-Link Shield and Programmer will be removed in a
future release
Warns

The support for Adafruit Bluefruit EZ-Link Shield and Programmer will be removed in a future
release

MATLAB support for Arduino hardware boards has been removed


Errors

These Arduino hardware boards are no longer supported:

• Arduino Fio
• Arduino Mini
• Arduino Pro

Connect to Arduino MKR WiFi 1010 board over a wireless network


(Introduced April 2019, Version 19.1.1)
The MATLAB Support Package for Arduino Hardware enables you to connect and communicate to the
MKR WiFi 1010 board over a wireless network.

Updated Release Note Entry (May 2019, Version 19.1.2)


The Release Notes for version 19.1.1 of MATLAB Support Package for Arduino Hardware was not
appearing. This issue is now resolved.

8-2
Inaccurate Byte Ordering Corrected (October 2019, Version 19.1.3)
You can now read and write data from an I2C device only in the little-endian format. In previous
releases, you were able to read and write data from I2C registers using the readRegister and
writeRegister functions in the big-endian format.

8-3
9

R2018b

Version: 18.2.1

Bug Fixes
10

R2018a

Version: 18.1.0

Bug Fixes
11

R2017b

Version: 17.2.0

New Features

Bug Fixes
R2017b

Arduino Setup UI: Setup a connection to your Arduino board over USB,
Bluetooth, or Wi-Fi
MATLAB Support Package for Arduino Hardware enables you to use the arduinosetup guided
interface to set up a connection to your Arduino board over USB, Bluetooth, or Wi-Fi®.

Arduino Plug-In Detection: Discover available Arduino support and


examples when plugging a compatible Arduino board
MATLAB Support Package for Arduino Hardware automatically detects compatible Arduino boards
plugged into your computer and also shows available Arduino support for MATLAB and Simulink®
along with examples.

11-2
12

R2017a

Version: 17.1.1

New Features

Bug Fixes
R2017a

Read from quadrature encoders


The MATLAB Support Package for Arduino Hardware enables you to read from Quadrature Encoders
to determine the speed, acceleration, and position of a rotating device.

Wirelessly connect to Arduino MKR1000 board over WiFi


The MATLAB Support Package for Arduino Hardware enables you to wirelessly connect and
communicate to the Arduino MKR1000 board over WiFi.

Wirelessly connect to Arduino boards over Bluetooth (Introduced April


2017)
MATLAB Support Package for Arduino Hardware enables you to wirelessly connect and communicate
to the Arduino boards over Bluetooth using low-cost Bluetooth devices such as Adafruit Bluefruit EZ-
Link, HC-05, or HC-06. Instrument Control Toolbox software is required to set up communication
using Bluetooth.

12-2
13

R2016b

Version: 16.2.1

New Features

Bug Fixes
R2016b

Read from and write to shift registers


Use the MATLAB Support Package for Arduino Hardware to:

• Write data to shift registers to control multiple outputs using one pin on an Arduino board.
• Read data from shift registers to gather inputs from multiple sources using one pin on an Arduino
board.

Support Package Installation via Add-On Explorer: Install, manage,


and update support packages
You can now install MATLAB Support Package for Arduino Hardware using the MATLAB Add-Ons
menu.

Install the Support Package

To install support package for Arduino hardware:

On the MATLAB Home tab, in the Environment section, click Add-Ons > Get Hardware Support
Packages.

In the Add-On Explorer search bar, search for MATLAB Support Package for Arduino Hardware, and
then click the MATLAB Support Package for Arduino Hardware add-on.

Uninstall the Support Package

To uninstall support package for Arduino hardware:

On the MATLAB Home tab, in the Environment section, click Add-Ons > Manage Add-Ons.

Update the Support Package

To update support package for Arduino hardware:

On the MATLAB Home tab, in the Environment section, click Add-Ons > Check for Updates >
Hardware Support Packages.

For more information about using Add-On Explorer, see Get Add-Ons.

Expanded Arduino IO SDK to support background operations


You can now override default methods of the LibraryBase C++ class in your custom Arduino libraries
to set initial values to your variables and perform repetitive tasks.

13-2
14

R2016a

Version: 16.1.0

Bug Fixes
15

R2015b

Version: 15.2.3

New Features

Bug Fixes
R2015b

Build custom add-ons to interface with additional hardware and


software libraries (Introduced January 2016)
MATLAB Support Package for Arduino Hardware provides a framework of classes that you can use to
create custom applications to use with your Arduino device. The custom applications could be code,
libraries, or devices that work with an Arduino.

• Libraries and custom code allow you to enhance Arduino.


• Add-on devices allow you to expand your hardware capabilities.

Write your client-side code using the MATLAB framework and your server-side code using C++
framework.

To create a custom library, you need a C++ header file and a MATLAB wrapper class file. The
MATLAB file defines commands that call the custom Arduino code. The header files process the data
sent by MATLAB commands that call the actual custom code. You can also include third-party library
header files in your custom library.

To create custom Arduino libraries, you should have a working knowledge of:

• MATLAB classes
• C++
• The functionality of your hardware device, and its associated application programming interface
(API)

For information about creating a custom library, see the Custom Arduino Libraries section of the
MATLAB Support Package for Arduino Hardware documentation.

Ability to specify clock rate of SPI connection (Introduced January


2016)
You can now specify the clock rate when you create a SPI connection. You can also modify the clock
rate of an existing connection. For more information, see the spidev reference page.

15-2
16

R2015a

Version: 15.1.0

New Features

Bug Fixes

Compatibility Considerations
R2015a

Support for Arduino Leonardo and other boards with MATLAB Support
Package for Arduino Hardware
You can now use these boards with MATLAB Support Package for Arduino Hardware:

• Arduino Leonardo
• Arduino Micro
• Arduino Mega ADK
• Arduino Nano 3.1
• Sparkfun Redboard
• Sparkfun Digital Sandbox
• Sainsmart Uno
• Sainsmart Mega 2560

New configurePin function


In release R2015a, use configurePin to set your pin mode. You can use string values, such as 'D2'
to specify digital pins.

Functionality being removed or changed


Functionality Result Use This Instead Compatibility Considerations
configureAnalogPi Warns configurePin Replace all instances of
n configureAnalogPin with
configurePin.
configureDigitalP Warns configurePin Replace all instances of
in configureDigitalPin with
configurePin.
AvailableAnalogPi Warns AvailablePins Replace all instances of
ns AvailableAnalogPins with
AvailablePins
AvailableDigitalP Warns AvailablePins Replace all instances of
ins AvailableDigitalPins with
AvailablePins

16-2
17

R2014b

Version: 14.2.0

New Features
R2014b

Support package for Arduino hardware


You can use the MATLAB Support Package for Arduino Hardware on 32-bit and 64-bit Microsoft®
Windows® systems, Mac OS, and 64-bit Linux® systems.

Use Arduino boards connected to your system over USB cables to:

• Get data from the Arduino board.


• Get data from I2C and SPI devices.
• Control and get data from servo motors.
• Get data from add-on shields.

The support package supports Arduino Uno, Arduino Due, and Arduino Mega 2560 boards.

Using command-line interface in MATLAB you can:

• Start programing right away without additional toolboxes.


• Interactively develop and debug in MATLAB.
• Interactively develop programs to acquire analog and digital data, and to control DC, servo, and
stepper motors.
• Process the data in MATLAB in a variety of ways, including creating plots.
• Access peripheral devices and sensors connected over I2C or SPI.
• Run control loops at up to 25 Hz (not real time).

The arduino command creates an arduino object that enables you to connect to the board.

17-2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy