242 views|0 replies

6027

Posts

6

Resources
The OP
 

【Follow me Season 2 Episode 1】Step by step practice: RGB (W2812) [Copy link]

 
The Circuit Playground Express has 10 RGB (W2812) built into it, located in a circle around the board, just inside the outer ring of alligator clip-friendly pads. RGB refers to the three primary colors Red, Green, and Blue, which means you can create any color and variety with these LEDs.
The colorful marquee at the beginning is this:
It is encapsulated in cp, and the corresponding flag is pixels. We know that this color adjustment basically has an adjustment range of 0~255. Let's first implement monochrome:
cp.pixels.fill((50, 0, 0))
The above code implements the whole RGB display red, showing a single array-like method:
cp.pixels[0] = (255, 0, 0)
Note the corresponding positions of each RGB:
We can change the display brightness, up to a maximum of 1:
cp.pixels.brightness = 0.3
This post is from DigiKey Technology Zone
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 

Just looking around
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