showLEDs
Show location, name, and color of user-controllable LEDs
Syntax
Description
Examples
Control the On-Board LED
You can locate and control the on-board LED, turning it on and off.
Create a connection from the MATLAB® software to the Raspberry Pi™ board.
mypi = raspi
mypi = Raspi with Properties: DeviceAddress: 'raspberrypi-hysdu8X38o' Port: 18725 BoardName: 'Raspberry Pi Model B Rev 2' AvailableLEDs: {'led0'} AvailableDigitalPins: [4 14 15 17 18 22 23 24 25 27 30 31] AvailableSPIChannels: {} AvailableI2CBuses: {'i2c-0' 'i2c-1'} I2CBusSpeed: 100000 Supported peripherals
The AvailableLEDs
property shows the name
of the user-controllable LED.
Show the location of the user-controllable LED on the board.
showLEDs(mypi)
Turn on the specified LED by setting its value to 1
or true
.
writeLED(mypi,'led0',1)
Turn off the LED by setting its value to 0
or false
.
writeLED(mypi,'led0',false)
Restarting the Raspberry Pi hardware returns the LED to its previous function as an activity indicator.
Input Arguments
mypi
— Connection to specific Raspberry Pi hardware board
raspi object
Connection to a specific Raspberry Pi hardware board, specified
as a raspi
object.
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)