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, 0, 0, 0]
]
while True:
for fi in range(18):
for col in range(18):
pos = fi * 18 + col #posiciones en la matriz
if emoji[fi][col] == 1:
pixels.set_pixel(pos, (48, 124, 235)) #azul oscura
elif emoji[fi][col] == 2:
pixels.set_pixel(pos, (255, 113, 28)) #celeste
elif emoji[fi][col] == 3:
pixels.set_pixel(pos, (38, 203, 255)) #naranja
elif emoji[fi][col] == 4:
pixels.set_pixel(pos, (0, 0, 0)) #negro
elif emoji[fi][col] == 5:
pixels.set_pixel(pos, (253, 255, 33)) #amarrillo
elif emoji[fi][col] == 6:
pixels.set_pixel(pos, (240, 52, 37)) #rojo
else:
pixels.set_pixel(pos, (255, 255, 255)) #blanco
pixels.show()
time.sleep(0.1)