8×8 Dot matrix

There are four (8×8) connected giving 8×32 dot matrix which you can use to create interesting patterns or as a display for text.

Code:

  1. #include <SPI.h>
  2. #include <Adafruit_GFX.h>
  3. #include <Max72xxPanel.h>
  4. int x = 0;
  5. int y = 0;
  6. int pinCS = 10;
  7. Max72xxPanel matrix = Max72xxPanel(pinCS, 1, 4);
  8. void setup()
  9. {
  10.   matrix.setIntensity(10);
  11. }
  12. void loop()
  13. {
  14.   y = random(0, 32);
  15.   x = random(0, 8);
  16.   matrix.fillScreen(0);
  17.   matrix.drawPixel(x, y, 1);
  18.   matrix.write();
  19.   delay(150);
  20. }