Let’s make the matrix glow. This works in the block editor or MicroPython — here’s the Python version.
Draw a heart
from bitsflow import display, Color
import time
heart = [
(1,0),(3,0),
(0,1),(2,1),(4,1),
(0,2),(4,2),
(1,3),(3,3),
(2,4),
]
while True:
for b in range(20, 100, 5):
for x, y in heart:
display.set_pixel(x, y, Color.RED, brightness=b)
time.sleep(0.03)
What you learned
- Setting individual pixels with
set_pixel - Using brightness to create a pulse effect
- The basic animation loop
Next up: reading the accelerometer to make your art react to motion.