Skip to content

Commit 47bfe24

Browse files
committed
Added fade
1 parent 2484480 commit 47bfe24

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/examples/python/i2cmatrix.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@
2525
]
2626

2727
bus.write_i2c_block_data(matrix, 0, frown)
28-
time.sleep(delay)
28+
for fade in range(0xef, 0xe0, -1):
29+
bus.write_byte_data(matrix, fade, 0)
30+
time.sleep(delay/10)
2931

3032
bus.write_i2c_block_data(matrix, 0, neutral)
31-
time.sleep(delay)
33+
for fade in range(0xe0, 0xef, 1):
34+
bus.write_byte_data(matrix, fade, 0)
35+
time.sleep(delay/10)
3236

3337
bus.write_i2c_block_data(matrix, 0, smile)

0 commit comments

Comments
 (0)