You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ There are two ways to initialize a `Glyph` object: with a bit array and with a b
19
19
#### RGBImage
20
20
A RGBImage is a color image using one of two color modes: 6 bit and 12 bit. There are two types of RGBImage object, the immutable `RGBImage` object and the mutable `MutableRGBImage` object. The advantage of the immutable `RGBImage` object is that it can be initialized with a `PROGMEM` block, thus reducing the RAM footprint for statically constructed `RGBImage` objects.
21
21
22
-
Color for the image is represented by a `ColorType` value. When the preprocessor macro `TWELVE_BIT_COLOR` is defined to `1`, `ColorType` will be an `unsigned int` with the following bit layout:
22
+
Color for the image is represented by a `RGBColorType` value. When the preprocessor macro `TWELVE_BIT_COLOR` is defined to `1`, `RGBColorType` will be an `unsigned int` with the following bit layout:
23
23
24
24
```
25
25
Bits 0 4 8 12
@@ -34,7 +34,7 @@ Bits 0 4 8 12
34
34
```
35
35
Color can easily be set in hexadecimal format, as the 2nd byte is red, the third byte is green, and the fourth byte is blue. The left most bit of the first byte is used to indicate whether the color is transparent or not. For operations that support transparency, any other color bits are ignored when the transparency bit is set. Transparency is primarily used when drawing one `RGBImage` onto another. Transparent colors will not change the color of the underlying pixel the `RGBImage` is being drawn on top of.
36
36
37
-
When the preprocessor macro `TWELVE_BIT_COLOR` is defined to `0`, `ColorType` will be an `unsigned char` with the following bit layout:
37
+
When the preprocessor macro `TWELVE_BIT_COLOR` is defined to `0`, `RGBColorType` will be an `unsigned char` with the following bit layout:
38
38
39
39
```
40
40
Bits 0 4
@@ -48,15 +48,15 @@ Bits 0 4
48
48
B = Blue
49
49
```
50
50
51
-
An `RGBImage` can be initialized with an array of `ColorType` values sized to be the image's rows\*columns.
51
+
An `RGBImage` can be initialized with an array of `RGBColorType` values sized to be the image's rows\*columns.
52
52
### Matrix Driver
53
53
The matrix driver is an object that manages rendering an image on an LED matrix. It does this using a double buffer approach. The first buffer is the image that is desired to be rendered on the LED matrix. The second buffer is the bit sequences that needs to be sent to the LED matrix's shift registers to render the image. The matrix drive object uses SPI to send the bits to the shift register. Since the rows on the matrix are multiplexed when rendering, the matrix driver object will use a system clock interrupt to ensure the multiplexing is consistently timed.
54
54
55
55
When constructing a matrix driver, you need to tell it a few details:
56
56
* The matrix's size in rows and columns
57
57
* Whether the shift registers used for controlling columns should be set to `HIGH` or `LOW` to turn on the column.
58
58
* Whether the shift registers used for controlling rows should be set to `HIGH` or `LOW` to turn on the row
59
-
* The pin which will be used to send the latch signle.
59
+
* The pin which will be used to send the latch signal.
60
60
61
61
#### LEDMatrix
62
62
The `LEDMatrix` driver is used for matrices of single color LEDs. This drive uses a `MutableGlyph` as its image buffer.
0 commit comments