fixing links
This commit is contained in:
34
docs/reference/basic/plot-leds.md
Normal file
34
docs/reference/basic/plot-leds.md
Normal file
@ -0,0 +1,34 @@
|
||||
# Plot LEDs
|
||||
|
||||
Display an [Image](/reference/images/image) on the @boardname@'s [LED screen](/device/screen). NOTE: `basic -> plot image` has been replaced by `basic -> show leds`.
|
||||
|
||||
```sig
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . # . .
|
||||
# . . . #
|
||||
. # # # .
|
||||
`)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
* leds - a series of LED on/off states that form an image (see steps below)
|
||||
|
||||
### Example: smiley
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . # . .
|
||||
# . . . #
|
||||
. # # # .
|
||||
`)
|
||||
```
|
||||
|
||||
### See also
|
||||
|
||||
[show animation](/reference/basic/show-animation), [image](/reference/images/image), [show image](/reference/images/show-image), [scroll image](/reference/images/scroll-image)
|
||||
|
@ -43,5 +43,5 @@ on and `.` means an LED that is turned off.
|
||||
|
||||
### See also
|
||||
|
||||
[plot leds](/reference/led/plot-leds), [show animation](/reference/basic/show-animation)
|
||||
[plot leds](/reference/basic/plot-leds), [show animation](/reference/basic/show-animation)
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
Show a number on the [LED screen](/device/screen). It will slide left if it has more than one digit.
|
||||
|
||||
~~~~sig
|
||||
basic.showNumber(2, 150)
|
||||
~~~~
|
||||
```sig
|
||||
basic.showNumber(2)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -15,27 +15,27 @@ basic.showNumber(2, 150)
|
||||
|
||||
To show the number 10:
|
||||
|
||||
~~~~blocks
|
||||
```blocks
|
||||
basic.showNumber(10)
|
||||
~~~~
|
||||
```
|
||||
|
||||
To show the number stored in a variable:
|
||||
|
||||
~~~~blocks
|
||||
```blocks
|
||||
let x = 1
|
||||
basic.showNumber(x)
|
||||
~~~~
|
||||
```
|
||||
|
||||
### Example: count to 5
|
||||
|
||||
This example uses a [for](/blocks/loops/for) loop to show numbers ``0`` through ``5`` on the screen:
|
||||
|
||||
~~~~blocks
|
||||
```blocks
|
||||
for (let i = 0; i < 6; i++) {
|
||||
basic.showNumber(i)
|
||||
basic.pause(200)
|
||||
}
|
||||
~~~~
|
||||
```
|
||||
|
||||
### Other show functions
|
||||
|
||||
|
Reference in New Issue
Block a user