Main Content

showLEDs

Show location, name, and color of user-controllable LEDs

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

Description

example

showLEDs(bbb) displays the location, name, and color of the user-controllable LEDs on the board.

Examples

collapse all

Locate and control the onboard LED, turning it on and off.

Create a connection from the MATLAB® software to the BeagleBone® Black hardware.

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: {} 

The AvailableLEDs property shows the name of the user-controllable LED.

Show the location of the user-controllable LED on the board.

showLEDs(bbb)

The figure shows the output of a call to showLEDs.

Turn on the specified LED by setting its value to 1 or true.

writeLED(bbb,'usr0',1)

Turn off the LED by setting its value to 0 or false.

writeLED(bbb,'usr0',false)

Input Arguments

collapse all

BeagleBone Black connection created using beaglebone, specified as an object.

Version History

Introduced in R2015a