#include <MD_MAX72xx.h>

#define HARDWARE_TYPE MD_MAX72XX::DR0CR0RR1_HW
#define NUM_OF_MATRIX 1

#define CLK_PIN   8
#define DATA_PIN  6
#define CS_PIN    7

MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, NUM_OF_MATRIX);

void setup() {
  // inicializar el objeto mx
  mx.begin(); 
}
 
void loop() {
  mx.clear();
 
  // encender los LEDs de las esquinas
  mx.setPoint( 0, 0, 1 );
  mx.setPoint( 7, 7, 1 );
  mx.setPoint( 0, 7, 1 );
  mx.setPoint( 7, 0, 1 );  
  delay(1000);
 
  // encender los LEDs del centro
  mx.setPoint( 3, 3, 1 );
  mx.setPoint( 3, 4, 1 );
  mx.setPoint( 4, 3, 1 );
  mx.setPoint( 4, 4, 1 );
  delay(2000); 
}
Loading
pi-pico-w