Main Content

targetHardware

Create configuration object for hardware

Add-On Required: This feature requires the MATLAB Support Package for Raspberry Pi Hardware add-on.

Description

targetObj = targetHardware(hardwareName) creates a configuration object for the hardware. You can deploy your MATLAB® function as a standalone executable on the hardware by using this object with the deploy method.

Examples

collapse all

Note

This example is applicable to the installed MATLAB Support Package for Raspberry Pi® Hardware.

Create a configuration object of the Raspberry Pi hardware.

Note

For Raspberry Pi with 32-bit OS use targetHardware('Raspberry Pi') and for 64-bit OS use targetHardware('Raspberry Pi (64bit)').

targetObj = targetHardware('Raspberry Pi (64bit)')
targetObj = 
 targetHardware with properties:

               Name: 'Raspberry Pi (64bit)'
      DeviceAddress: '172.18.182.234'
           Username: 'pi'
           Password: '*********'
           BuildDir: '/home/pi'
    EnableRunOnBoot: 0
        BuildAction: 'Build, load, and run'
        CoderConfig: [1×1 coder.CodeConfig]

Create a configuration object of the Raspberry Pi hardware in MATLAB Online™.

Note

For Raspberry Pi with 32-bit OS use targetHardware('Raspberry Pi') and for 64-bit OS use targetHardware('Raspberry Pi (64bit)').

targetObj = targetHardware('Raspberry Pi (64bit)')
board =
 
targetHardware with properties:
 
               Name: 'Raspberry Pi (64bit)'
      DeviceAddress: '0000000096843414'
           Username: ''
           Password: ''
           BuildDir: '/home/matlabrpi'
    EnableRunOnBoot: 0
        BuildAction: 'Build, load, and run'
        CoderConfig: [1x1 coder.CodeConfig]

Input Arguments

collapse all

Name of the hardware on which the MATLAB function is to be deployed.

For Raspberry Pi with 32-bit OS use targetHardware('Raspberry Pi') and for 64-bit OS use targetHardware('Raspberry Pi (64bit)').

Example: 'Raspberry Pi (64bit)'

Data Types: char

Output Arguments

collapse all

The configuration object of the specified hardware, returned as a targetHardware object.

Extended Capabilities

expand all

Version History

Introduced in R2018b