Skip to content

Commit 311aec5

Browse files
authored
Fix bullet lists
1 parent a5d7430 commit 311aec5

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

docs/Berry_Addressable-LED.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,22 @@ Finally the frame buffer is copied to the physical WS2812 led strip, after apply
8686
### `animate.core` class
8787

8888
This is the main helper class to host all the animation components. It is composed of:
89+
8990
- `strip` object representing the led strip (1-dimension, only RGB supported for now)
9091
- `bri` parameter (0..100) to control the overall brightness
9192
- `frame` the background frame buffer, instance of `animate.frame`
9293
- `layer` the current frame buffer being painted by a `painter`, instance of `animate.frame`. It is merged to `frame` once painted, taking into account transparency (alpha channel)
9394

9495
The instance also does the following:
96+
9597
- register a `fast_loop` for quick animation, and iterate every 20ms (50Hz)
9698
- call each `animator` object to compute new values of all parameters
9799
- call each `painter` object to paint layers on top of each others
98100
- apply brightness to frame buffer
99101
- copy to `strip` WS2812 leds
100102

101103
Methods:
104+
102105
- `init(strip [, bri:int])` constructor, needs a strip, brightness defaults to 50%
103106
- `set_bri()` and `get_bri()` to set/get brightness
104107
- `add_animator()` adds an animator object to be called at each tick
@@ -115,6 +118,7 @@ This class is a helper class to manage RGB pixels frame, mix layers and compute
115118
`Leds_frame` is a super-class of `bytes` and encapsulate a raw bytes buffer. Each pixel is in ARGB 32 bits format with alpha-channel.
116119

117120
Methods:
121+
118122
- constructor `Leds_frame(number_of_pixels:int)`: creates a frame buffer with the specified number of pixels (the actual bytes buffer is x4 this size). The buffer is filled with black opaque by default
119123
- `frame[i]`: read/write the 32-bit value of the ARGB pixel at index `i`
120124
- `frame.set_pixel(i, r, g, b, alpha)`: set the pixel at index `i` for value `r`/`g`/`b` (0..255) and optional `alpha` channel (opaque 0x00 if not specified)
@@ -125,6 +129,7 @@ Methods:
125129
### pre-built animators
126130

127131
Currently the following animators are provided:
132+
128133
- `animate.oscillator`: generate a variable integer that can be used by painters as a cyclic value (brightness, size, speed...)
129134
- `animate.palette`: cycle through a color palette with smooth transitions
130135

@@ -229,15 +234,3 @@ ESP32S2|4
229234
ESP32C3|2
230235

231236
Currently `RMT` channel 0 is used by default if no GPIO `WS2812-1` is configured, `RMT` channel 1 otherwise.
232-
<!--
233-
## Example
234-
235-
Pulsating round on M5Stack Atom Matrix if GPIO 27 is configured as `WS1812 - 2`
236-
237-
```berry
238-
var strip = Leds_matrix(5,5, gpio.pin(gpio.WS2812, 1))
239-
var r = Round(strip, 2, 30)
240-
r.start()
241-
```
242-
243-
**VIDEO** -->

0 commit comments

Comments
 (0)