1423 views|5 replies

1w

Posts

25

Resources
The OP
 

Faster CircuitPython LED animation with ulab [Copy link]

 

Create a "working copy" of the LED data in a ulab/numpy array and use the ulab functions wherever possible. Then at the last possible moment, copy the information from the working copy into the real LEDs object. This only adds a few lines of code to the existing solution, and you get to use all those cool ulab array functions (it would be really cool if the NeoPixel object could accept a ulab array to avoid this copying). --

链接已隐藏,如需查看请登录或者注册
.

  • fire_no_ulab.py: ~40 milliseconds per frame for 256 LEDs on an RP2040
  • fire_with_ulab.py: ~4 milliseconds per frame for 256 LEDs on an RP2040

Latest reply

The buf defined inside NeoPixel is accessible externally Directly operate np.buf[]   Details Published on 2023-2-27 10:37
 
 

685

Posts

0

Resources
2
 

I don't see any difference...

Comments

The following is faster, theoretically 10 times faster  Details Published on 2022-11-2 12:02
 
 
 

1w

Posts

25

Resources
3
 
Extreme Zero posted on 2022-11-2 10:43 I don’t see any difference. . . .

The following is faster, theoretically 10 times faster

 
 
 

64

Posts

0

Resources
4
 

This may be used to speed up the display of ssd1306

 
 
 

6818

Posts

11

Resources
5
 

Thanks for sharing, I'll learn from it when I have time.

 
 
 

64

Posts

0

Resources
6
 

The buf defined inside NeoPixel is accessible externally

Directly operate np.buf[]

 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list