1
- ![ build] ( https://img.shields.io/github/workflow/status/alexeden/rpi-led-matrix/Docker%20Install%20&%20Build %20-%20Raspberry%20Pi%203?label=RPI3%20BUILD&style=for-the-badge )
1
+ ![ build] ( https://img.shields.io/github/workflow/status/alexeden/rpi-led-matrix/Build %20-%20Raspberry%20Pi%203?label=RPI3%20BUILD&style=for-the-badge )
2
2
![ npm version] ( https://img.shields.io/npm/v/rpi-led-matrix/latest?style=for-the-badge )
3
3
![ types] ( https://img.shields.io/npm/types/rpi-led-matrix?style=for-the-badge )
4
4
![ dependencies] ( https://img.shields.io/librariesio/release/npm/rpi-led-matrix?style=for-the-badge&logoColor=white )
@@ -53,10 +53,10 @@ Usage:
53
53
54
54
``` ts
55
55
// In a .ts file
56
- import * as matrix from " rpi-led-matrix" ;
56
+ import * as matrix from ' rpi-led-matrix' ;
57
57
58
58
// Or, in a .js file
59
- const matrix = require (" rpi-led-matrix" );
59
+ const matrix = require (' rpi-led-matrix' );
60
60
```
61
61
62
62
# Getting Started
@@ -83,7 +83,7 @@ Both `MatrixOptions` and `RuntimeOptions` are of a non-trivial size in terms of
83
83
With the use of those helper methods, this is all it takes to create a matrix (of types ` LedMatrixInstance ` ) that's ready to glow:
84
84
85
85
``` ts
86
- import { LedMatrix } from " rpi-led-matrix" ;
86
+ import { LedMatrix } from ' rpi-led-matrix' ;
87
87
88
88
const matrix = new LedMatrix (
89
89
LedMatrix .defaultMatrixOptions (),
@@ -105,7 +105,7 @@ import {
105
105
GpioMapping ,
106
106
LedMatrixUtils ,
107
107
PixelMapperType ,
108
- } from " rpi-led-matrix" ;
108
+ } from ' rpi-led-matrix' ;
109
109
110
110
const matrix = new LedMatrix (
111
111
{
@@ -147,7 +147,7 @@ interface MatrixOptions {
147
147
disableHardwarePulsing: boolean ;
148
148
hardwareMapping: GpioMapping ;
149
149
inverseColors: boolean ;
150
- ledRgbSequence: " RGB" | " BGR" | " BRG" | " RBG" | " GRB" | " GBR" ;
150
+ ledRgbSequence: ' RGB' | ' BGR' | ' BRG' | ' RBG' | ' GRB' | ' GBR' ;
151
151
multiplexing: MuxType ;
152
152
parallel: 1 | 2 | 3 | 4 ;
153
153
pixelMapperConfig: string ;
@@ -188,12 +188,12 @@ enum RowAddressType {
188
188
189
189
``` ts
190
190
enum GpioMapping {
191
- Regular = " regular" ,
192
- AdafruitHat = " adafruit-hat" ,
193
- AdafruitHatPwm = " adafruit-hat-pwm" ,
194
- RegularPi1 = " regular-pi1" ,
195
- Classic = " classic" ,
196
- ClassicPi1 = " classic-pi1" ,
191
+ Regular = ' regular' ,
192
+ AdafruitHat = ' adafruit-hat' ,
193
+ AdafruitHatPwm = ' adafruit-hat-pwm' ,
194
+ RegularPi1 = ' regular-pi1' ,
195
+ Classic = ' classic' ,
196
+ ClassicPi1 = ' classic-pi1' ,
197
197
}
198
198
```
199
199
@@ -332,7 +332,7 @@ Finally, apply a sync hook that updates each pixel after each sync:
332
332
333
333
``` ts
334
334
matrix .afterSync ((mat , dt , t ) => {
335
- pulsers .forEach (( pulser ) => {
335
+ pulsers .forEach (pulser => {
336
336
matrix .fgColor (pulser .nextColor (t )).setPixel (pulser .x , pulser .y );
337
337
});
338
338
0 commit comments