Move showNumber to TS and call showString (#829)
This commit is contained in:
15
libs/core/basic.ts
Normal file
15
libs/core/basic.ts
Normal file
@ -0,0 +1,15 @@
|
||||
namespace basic {
|
||||
|
||||
/**
|
||||
* Scroll a number on the screen. If the number fits on the screen (i.e. is a single digit), do not scroll.
|
||||
* @param interval speed of scroll; eg: 150, 100, 200, -100
|
||||
*/
|
||||
//% help=basic/show-number
|
||||
//% weight=96
|
||||
//% blockId=device_show_number block="show|number %number" blockGap=8
|
||||
//% async
|
||||
//% parts="ledmatrix" interval.defl=150
|
||||
export function showNumber(value: number, interval?: number) {
|
||||
showString(value.toString(), interval);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user