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,15 @@ namespace EPXDisplay {
1919 //% weight=88
2020 export function play ( strip : neopixel . Strip , anim : EPXAnimations ) {
2121 switch ( anim ) {
22- case EPXAnimations . Globe : playBuffer ( strip , spinningGlobe ) ; break ;
23- case EPXAnimations . Weather : playBuffer ( strip , weather ) ; break ;
24- case EPXAnimations . ColorSpin : playBuffer ( 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 , smoothColorSpin ) ; break ;
2525 }
26+ strip . show ( ) ;
2627 }
2728
28- export function playBuffer ( strip : neopixel . Strip , anim : Buffer ) {
29+ //%
30+ export function writeAnimation ( strip : neopixel . Strip , anim : Buffer ) {
2931 const length = anim . length ;
3032 let palette = [ ] ;
3133
Original file line number Diff line number Diff line change 11let strip = neopixel . create ( DigitalPin . P0 , 256 , NeoPixelMode . RGB )
2- strip . setBrightness ( 30 ) ;
3- EPXDisplay . play ( strip , EPXAnimations . Weather ) ;
4- strip . show ( ) ;
2+ pins . digitalWritePin ( DigitalPin . P1 , 1 )
3+ strip . setBrightness ( 30 )
4+ EPXDisplay . play ( strip , EPXAnimations . ColorSpin )
5+ strip . show ( )
You can’t perform that action at this time.
0 commit comments