This repository was archived by the owner on Jun 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,13 +19,27 @@ namespace EPXDisplay {
1919 //% weight=88
2020 export function play ( strip : neopixel . Strip , anim : EPXAnimations ) {
2121 switch ( anim ) {
22- case EPXAnimations . Globe : writeAnimation ( strip , spinningGlobe ) ; break ;
23- case EPXAnimations . Weather : writeAnimation ( strip , weather ) ; break ;
24- case EPXAnimations . ColorSpin : writeAnimation ( strip , smoothColorSpin ) ; break ;
22+ case EPXAnimations . Globe : writeAnimation ( strip , SpinningGlobe ) ; break ;
23+ case EPXAnimations . Weather : writeAnimation ( strip , Weather ) ; break ;
24+ case EPXAnimations . ColorSpin : writeAnimation ( strip , ColorSpin ) ; break ;
2525 }
2626 strip . show ( ) ;
2727 }
2828
29+ /**
30+ * Turn off all LEDs.
31+ * You need to call ``show`` to make the changes visible.
32+ */
33+ //% blockId="EPXDisplay_powerupclear" block="$strip=variables_get(strip)|powerupclear with brightness %brightness "
34+ //% help=github:github.com/microsoft/ExpressivePixelsMakeCode/blob/master/HelpStartup.md
35+ //% weight=89
36+ export function powerupclear ( strip : neopixel . Strip , brightness : number ) : void {
37+ strip . setBrightness ( brightness ) ;
38+ strip . clear ( ) ;
39+ pause ( 1 ) ;
40+ strip . show ( ) ;
41+ }
42+
2943 //%
3044 export function writeAnimation ( strip : neopixel . Strip , anim : Buffer ) {
3145 const length = anim . length ;
You can’t perform that action at this time.
0 commit comments