|
1 | 1 | declare module basic { |
2 | | - export function showString(text:string, interval:number):void; |
3 | | -} |
| 2 | + /* {help:functions/show-string} |
| 3 | + * {weight:87} |
| 4 | + * {hints:interval:150,100,200,-100} |
| 5 | + * {shim:micro_bit::scrollString} |
| 6 | + */ |
| 7 | + /** |
| 8 | + * Display text on the display, one character at a time, and shift by one column each ``interval`` milliseconds. If the string fits on the screen (i.e. is one letter), does not scroll. |
| 9 | + */ |
| 10 | + export function showString(text: string, interval: number): void; |
| 11 | + |
| 12 | + /** |
| 13 | + * Turn off all LEDs |
| 14 | + * {help:functions/clear-screen} |
| 15 | + * {weight:79} |
| 16 | + * {shim:micro_bit::clearScreen} |
| 17 | + * {atomic} |
| 18 | + */ |
| 19 | + export function clearScreen(): void; |
4 | 20 |
|
| 21 | + /** |
| 22 | + * Pause for the specified time in milliseconds |
| 23 | + * {help:functions/pause} |
| 24 | + * {weight:88} |
| 25 | + * {hints:ms:100,200,500,1000,2000} |
| 26 | + * {shim:micro_bit::pause} |
| 27 | + */ |
| 28 | + export function pause(ms: number): void; |
| 29 | + |
| 30 | + /** |
| 31 | + * Scroll a number on the screen and shift by one column every ``interval`` milliseconds. If the number fits on the screen (i.e. is a single digit), does not scroll. |
| 32 | + * {help:functions/show-number} |
| 33 | + * {namespace:basic} |
| 34 | + * {weight:89} |
| 35 | + * {hints:interval:150,100,200,-100} |
| 36 | + * {shim:micro_bit::scrollNumber} |
| 37 | + */ |
| 38 | + export function showNumber(value: number, interval: number): void; |
| 39 | +} |
0 commit comments