-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.ts
22 lines (21 loc) · 918 Bytes
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
let ledmatrix = LEDMatrix.create(DigitalPin.P0, 32, 8, LEDColorMode.GRB)
ledmatrix.setColorAdjustment(true)
ledmatrix.setMatrixLayout(FirstLEDPosition.topLeft, LEDDirection.vertically, LEDRowSetup.zigZag)
ledmatrix.setBrightness(100)
ledmatrix.setLEDColor(0, 0, LEDMatrix.rgb(255, 0, 0))
ledmatrix.setLEDColor(1, 0, LEDMatrix.rgb(128, 0, 0))
ledmatrix.setLEDColor(0, 1, LEDMatrix.rgb(0, 255, 0))
ledmatrix.setLEDColor(0, 2, LEDMatrix.rgb(0, 0, 255))
ledmatrix.setLEDColor(2, 0, LEDMatrix.rgb(255, 255, 0))
ledmatrix.setLEDColor(2, 1, LEDMatrix.rgb(255, 0, 255))
ledmatrix.setLEDColor(2, 2, LEDMatrix.rgb(0, 255, 255))
ledmatrix.setLEDColor(3, 0, LEDMatrix.rgb(255, 100, 70))
for (let index = 0; index <= 100; index++) {
ledmatrix.setBrightness(100 - index)
basic.pause(10)
}
basic.pause(5000)
ledmatrix.clear()
basic.pause(50000)
}