Main Content

Install Support for MATLAB Support Package for BeagleBone Black Hardware

Add support for BeagleBone® Black hardware to the MATLAB® product by installing the MATLAB Support Package for BeagleBone Black Hardware.

This process installs the following items on your host computer:

  • MATLAB commands, objects, and functions

  • Examples

When you complete this installation, you can use MATLAB commands to control, and retrieve data from, BeagleBone Black hardware and peripherals.

The BeagleBone Black hardware is also referred to as a board.

Install, Update, or Uninstall Support Package

Install Support Package

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

    Use the Add-Ons pull down menu to Get Hardware Support Packages.

  2. In the Add-On Explorer window, click the support package and then click Install.

Update Support Package

On the MATLAB Home tab, in the Resources section, select Help > Check for Updates.

Uninstall Support Package

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

  2. In the Add-On Manager window, find and click the support package, and then click Uninstall.

Install BeagleBone Black Drivers

Install and test updated drivers for the BeagleBone Black board. For more information, see Getting Started with BeagleBone Black Hardware.

  1. Connect BeagleBone hardware to your computer using the USB cable provided with the kit.

    Connect BeagleBone to host computer

    BeagleBone Black boots Linux® and operates as a flash drive on your host computer. This drive contains a local copy of the BeagleBone Black drivers and documentation.

  2. Using Google® Chrome or Firefox®, navigate to the BeagleBone Black flash drive on your computer and click START.htm.

    Microsoft® Internet Explorer is not compatible with the interface.

  3. Under Install Drivers, select the correct installer for your operating system and follow the instructions on the screen.

  4. To test your drivers, in MATLAB, create a BeagleBone Black object:

    bbb = beaglebone
    bbb = 
    
      beaglebone with properties:
    
               DeviceAddress: '192.168.7.2'
                   BoardName: 'BeagleBone Black Rev 00C0'
               AvailableLEDs: {'USR0'  'USR1'  'USR2'  'USR3'}
        AvailableDigitalPins: {1x29 cell}
         AvailableAnalogPins: {'AIN0'  'AIN1'  'AIN2'  'AIN3'  'AIN4'  'AIN5'  'AIN6'}
            AvailablePWMPins: {}
        AvailableSPIChannels: {}
           AvailableI2CBuses: {'i2c-1'}
        AvailableSerialPorts: {}
            AvailableWebcams: {} 
  5. Test your driver installation by blinking one of the LEDs:

    writeLED(bbb, 'usr0', 1);
    pause(1);
    writeLED(bbb, 'usr0', 0);

BeagleBone Black Cable Connection

Before you start using the BeagleBone Black hardware, decide whether to connect the hardware to your computer using the USB cable provided with the product or whether to use an Ethernet cable connection.

To connect to the BeagleBone Black hardware via a USB cable, attach the cable as shown.

Start the BeagleBone Black interface using the following command.

bbb = beaglebone('192.168.7.2', 'username', 'password')

The IP address '192.168.7.2' is the predefined address of the USB port. For 'username' and 'password', you can use one of the defaults:

Default usernameDefault password
'root'''
'debian''temppwd'

If you change the account information, you must supply the correct 'username' and 'password'.

To connect to BeagleBone Black via an Ethernet network, you connect the board to an Ethernet network using a standard Ethernet cable, give the board an IP address, and optionally assign a hostname to that IP address. You can then use one of the following commands:

bbb = beaglebone('ip_address', 'username', 'password')
bbb = beaglebone('hostname', 'username', 'password')

As with the USB connection, you can use one of the default 'username' and 'password' combination or create a new 'username' and 'password'.

After you have first connected to the hardware, you can use the following command to connect on subsequent occasions:

bbb = beaglebone()

The software will use the latest 'ip_address' ('hostname'), 'username', and 'password'.

For more information about installation, see the local copy of the BeagleBone drivers and documentation in the BeagleBone Black boot folder mounted on your host computer, or Getting Started with BeagleBone Black Hardware.