displayMessage
Scrolls a text message across the LED Matrix
Description
displayMessage(
displays a scrolling message from right to left across the LED Matrix at the
specified orientation, scrolling speed, text color, and background color.mysh
,Message
,Name,Value
)
Examples
Display Text Message across LED Matrix
You can display the message ‘Hello World’ applying the following arguments.
displayMessage(mysh,'Hello World')
Displays the message ‘Hello World’ on the LED Matrix as a scrolling text. The text scrolls at a speed of 0.1 second, the text color is red, and background color is black.
displayMessage(mysh,'Hello World','Orientation',90)
Displays the message ‘Hello World’ on the LED Matrix as a scrolling text. The text is now oriented at 90 degrees.
displayMessage(mysh,'Hello World','ScrollingSpeed',0.05)
Displays the message ‘Hello World’ on the LED Matrix as a scrolling text with the specified scrolling speed of 0.05 seconds.
displayMessage(mysh,'Hello World','TextColor','w') or displayMessage(mysh,'Hello World','TextColor',[255 255 255])
Displays the message ‘Hello World’ on the LED Matrix as a scrolling text. The color of the text is now set to the specified color ‘white’.
displayMessage(mysh,'Hello World','BackgroundColor','w') or displayMessage(mysh,'Hello World','BackgroundColor',[255 0 0])
Displays the message ‘Hello World’ on the LED Matrix as a scrolling text. The background color is now set to the specified color ‘white’.
displayMessage(mysh,'Hello World','Orientation',90,'ScrollingSpeed',0.05,'TextColor','w','BackgroundColor','r')
Displays the message ‘Hello World’ on the LED Matrix as a scrolling text with the specified orientation, scrolling speed, text color, and the background color.
Input Arguments
mysh
— Connection to SenseHAT
Sense HAT object
Connection to a SenseHAT board, specified as a sensehat object.
Message
— The Scrolling message to be displayed
The Scrolling message to be displayed from right to left at the specified speed, color, and the background color. Message can be specified as a string.
Example: Msg = ‘Do you speak MATLAB?’
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Orientation
— Orientation of the message
90
(default)
The orientation to applied for the message to be displayed. The supported values of orientation are 0, 90, 180, and 270.
Example: 90
ScrollingSpeed
— Scrolling speed of the message
0.05
(default)
The speed at which the message should scroll from right to left.
Example: 0.05
TextColor
— Text color of the message
[255, 255, 255]
(default)
The color in which the scrolling message should be displayed.
You can specify the following colors by name:
‘red’ or ‘r’
‘blue’ or ‘b’
‘green’ or ‘g’
‘cyan’ or ‘c’
‘magenta’ or ‘m’
‘yellow’ or ‘y’
‘white’ or ‘w’
‘black’ or ‘k’
Example: [255 255 255]
BackgroundColor
— Background color for the scrolling message
[255, 0, 0]
(default)
The background color with which the scrolling message should be displayed.
You can specify the following colors by name:
‘red’ or ‘r’
‘blue’ or ‘b’
‘green’ or ‘g’
‘cyan’ or ‘c’
‘magenta’ or ‘m’
‘yellow’ or ‘y’
‘white’ or ‘w’
‘black’ or ‘k’
Example: [255 0 0]
Version History
Introduced in R2016b
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
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)