FC-16 led matrix module based on MAX7219 EDIT:

const char  *pc[NUM_ZONES] =
{
  "ROOM", //0
  "SUBJECT", //1
  "GRADE",//2
  }; 


I did this and I can't get them to display every row simultaneously.

void loop(void)
{

 DateTime now = rtc.now();
 char buffer[] = "hh:mm";  // hours and minutes

 for (uint8_t i=0; i&lt;NUM_ZONES; i++){
   P.displayZoneText(0,now.toString(buffer), PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
   P.displayZoneText(1, pc[1], PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
   P.displayZoneText(2, pc[2], PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);  // display
   P.displayZoneText(3, pc[3], PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
 }
}  


I can only display one row at a time like this, now it only displays the hour:min.

Tell me what am I doing wrong

EDIT2:

Or like this:

-this is my goal, to change the text based on hour

void loop(void)
{

 DateTime now = rtc.now();
 char buffer[] = "hh:mm";  // hours and minutes


   P.displayZoneText(0,now.toString(buffer), PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);

   if(now.hour()==21){
   P.displayZoneText(1, pc[1], PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
   P.displayZoneText(2, pc[2], PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);  // display
   P.displayZoneText(3, pc[3], PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);
   }
   P.displayAnimate();
}


And at the moment with this code it only displays the hour and minutes
I haven't used this library, but reading through the documentation it seems it operates on the concept of zones.


Create a zone for each row (a zone is a contiguous block of modules forming a kind of sub-display)
Perform operations on the zones with the zone-specific functions.


For example, setting up your zones would be:

P.begin(4); // We will have 4 zones
P.setZone(0, 0, 3); // Modules 0-3 in zone 0
P.setZone(1, 4, 7); // Modules 4-7 in zone 1
P.setZone(2, 8, 11); // Modules 8-11 in zone 2
P.setZone(3, 12, 15); // Modules 12-15 in zone 3


Then you can clear a zone with:

P.displayClear(2); // Clear zone 2


And write text to a zone with:

P.displayZoneText(3, "P03", PA_CENTER, 0, 0, PA_NO_EFFECT, PA_NO_EFFECT);


I'm not certain about what all the parameters mean, but the prototype is:

void displayZoneText(uint8_t z, const char *pText, textPosition_t align, uint16_t speed, uint16_t pause, textEffect_t effectIn, textEffect_t effectOut = PA_NO_EFFECT);