more docs for show-arrow. correct errors

This commit is contained in:
Tom Ball 2017-02-27 10:51:52 -08:00
parent 2361d1910a
commit 30fe647f51
4 changed files with 27 additions and 2 deletions

View File

@ -25,6 +25,7 @@ basic.plotLeds(`
. . . . .
. . . . .
`);
basic.showArrow(ArrowNames.North);
basic.showAnimation(`
. . . . .
. . . . .

View File

@ -0,0 +1,23 @@
# Show Arrow
Shows the selected arrow on the LED screen
```sig
basic.showArrow(ArrowNames.North)
```
### Example
This program shows all eight arrows.
```blocks
for (let index = 0; index <= 7; index++) {
basic.showArrow(index)
basic.pause(300)
}
```
### See also
[showIcon](/reference/basic/show-icon),
[showLeds](/reference/basic/show-leds)

View File

@ -18,5 +18,4 @@ basic.showIcon(IconNames.Sad)
### See also
[show leds](/reference/led/show-leds)
[showLeds](/reference/basic/show-leds)

View File

@ -136,6 +136,7 @@ namespace basic {
//% blockId=basic_show_icon
//% block="show icon %i" icon="\uf00a"
//% parts="ledmatrix"
//% help=basic/show-icon
export function showIcon(icon: IconNames) {
let res = images.iconImage(icon)
res.showImage(0)
@ -146,6 +147,7 @@ namespace basic {
//% block="show arrow %i=device_arrow"
//% parts="ledmatrix"
//% advanced=true
//% help=basic/show-arrow
export function showArrow(i: number) {
let res = images.arrowImage(i)
res.showImage(0)