a piece of text.
A String is a sequence of characters. For the Calliope mini, ASCII character codes 32 to 126 are supported; letters, digits, punctuation marks, and a few symbols. All other character codes appear as a ? on the LED screen.
let salutation = "Hello";
To create a variable that holds a string:
Click Variables
(in the Block drawer).
Type a name for your new string variable by clicking the down arrow, then click New Variable. Then type the variable name “salutation”
Drag a string block on the right side of the operator.
Click "Hello"
and then type a string like hello
.
Your code should look something like this:
let salutation = "Hello";
show string
Use show string to display a string on the LED screen.
If the string is multiple characters, the string scrolls right to left. The following example displays Hello world!
on the Calliope mini screen:
basic.showString("Hello world!");
The parameter of show string
specifies the string