Combinar dos ejemplos de libreria Parola

Buen dia,
en principio debo decir que he comenzado a trabajar con Arduino hace unos tres meses y la verdad que me apasiona todo lo que es capaz de hacer.
No tengo experiencia en el lenguaje utilizado en esta plataforma, pero si, estoy aprendiendo atravez de la informacion disponible en internet.
Paso a describir mi consulta:
Utilizo un Arduino mega 2560.
Lo que deseo hacer es combinar el ejemplo de Parola_Animation_Catalogo con este otro ejemplo Parola_Zone_TimeMsg .Mi objetivo es que al finalizar un sketch continue con el siguiente y luego comience todo de nuevo, es decir reproducir en la matriz de led un sketch a continuacion de otro y volver al comienzo para repetir siempre la misma secuencia.
Ambos sketch, funcionan correctamente por separado.
Despues de buscar informacion por google realice varias pruebas, creando dentro del void loop, un void sketch1 y otro void sketch2 con el codigo correspondiente a cada ejemplo pero no funciona asi.
Hice varios intentos tratando de combinar los codigos y no consigo su buen funcionamiento.
Quisiera saber si pueden orientarme a encontrar el modo de combinar estos dos ejemplos.
Agradesco la colaboracion.

crea una función que involucre el loop del primer código y la llamas p.ej. funcion1 y lo mismo con el segundo loop previametne agregando todos las variables globales, librerias (#include) y si hubiera alguna instrucción en el setup.

al final te quedarán.
Todas las librerías.(no repetidos)
Todos los globales (no repetidos)
un setup que contemple los dos

un loop mas o menso asi

void loop() {
    funcion1();
    funcion2();
}

void funcion1(){

 // todo lo que esta en el primer loop
}

void funcion2(){

 // todo lo que esta en el segundo loop
}

Gracias por responder Surbyte, voy a probarlo y comento.

Hola surbyte,
al querer juntar los codigos del setup, sucede que un sketch inicializa la matriz completa con P.begin();
y en el segundo sketch, como divide la matriz en dos zonas usa P.begin(2);
Entonces no comprendo como juntar los codigos del setup para que ejecute correctamente los dos sketch.
Realice tu indicacion anterior creando las dos funciones con el codigo de loop para cada una pero con un solo setup y compilo correctamente y realiza solo la primera funcion. La segunda no la ejecuta porque me falta el setup y es ahi donde no se como hacerlo.
Gracias.

Perdon, ahora esta bien el post:

void setup1(void)
{

  P.begin();
  P.setInvert(false);
 
  
  for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
  {
    catalog[i].speed *= P.getSpeed();
    catalog[i].pause *= 500;
     
  }
}
void setup2(void)
{
  P.begin(2);
  P.setInvert(false);
  
  P.setZone(0, 0, MAX_DEVICES-5);
  P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  P.setFont(1, numeric7Seg);

  P.displayZoneText(1, szTime, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(0, szMesg, PA_CENTER, SPEED_TIME, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
  
 

#if USE_DS1307
  RTC.control(DS1307_CLOCK_HALT, DS1307_OFF);
  RTC.control(DS1307_12H, DS1307_OFF);
#endif

  getTime(szTime);
}

Muestras los setup y que pasa con los loops?

que tal asi

void setup(void)
{

  P.begin();
  P.setInvert(false);
  P.setZone(0, 0, MAX_DEVICES-5);
  P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  P.setFont(1, numeric7Seg);

  P.displayZoneText(1, szTime, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(0, szMesg, PA_CENTER, SPEED_TIME, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT); 
  
  for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
  {
    catalog[i].speed *= P.getSpeed();
    catalog[i].pause *= 500;
     
  }

#if USE_DS1307
  RTC.control(DS1307_CLOCK_HALT, DS1307_OFF);
  RTC.control(DS1307_12H, DS1307_OFF);
#endif

  getTime(szTime);

}

Hola surbyte, disculpas y gracias de nuevo por tu respuesta.
Probe lo que me indicastes y el resultado fue el siguiente:

el texto fijo que debe aparecer en el centro de la matriz (8 modulos) aparece a la derecha,
y no termina de mostrar todo el catalogo porque se cuelga, representa mas o menos 60%
del catalogo, hasta antes de "Guitarra" y ya no muestra mas nada.

adjunto el codigo completo:

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#define  USE_DS1307  0
#include "Font_Data.h"
#if  USE_DS1307
#include <MD_DS1307.h>
#include <Wire.h>
#endif


// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may 
// need to be adapted
#define	MAX_DEVICES	8
#define	CLK_PIN		52
#define	DATA_PIN	51
#define	CS_PIN	  45


// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)

#define  SPEED_TIME  5
#define PAUSE_TIME  10
#define  MAX_MESG  20

// Global data
char  szTime[9];    // mm:ss\0
char  szMesg[MAX_MESG+1] = "";


char *mon2str(uint8_t mon, char *psz, uint8_t len)

// Get a label from PROGMEM into a char array
{
  static const __FlashStringHelper* str[] = 
  {
    F("Jan"), F("Feb"), F("Mar"), F("Apr"), 
    F("May"), F("Jun"), F("Jul"), F("Aug"), 
    F("Sep"), F("Oct"), F("Nov"), F("Dec")
  };

  strncpy_P(psz, (const char PROGMEM *)str[mon-1], len);
  psz[len] = '\0';

  return(psz);
}

char *dow2str(uint8_t code, char *psz, uint8_t len)
{
  static const __FlashStringHelper* str[] = 
  {
    F("Sunday"), F("Monday"), F("Tuesday"), 
    F("Wednesday"), F("Thursday"), F("Friday"), 
    F("Saturday")
  };
  
  strncpy_P(psz, (const char PROGMEM *)str[code-1], len);
  psz[len] = '\0';

  return(psz);
}

void getTime(char *psz, bool f = true)
// Code for reading clock time
{
#if USE_DS1307
  RTC.readTime();
  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m);
#else
  uint16_t  h, m, s;
  
  s = millis()/1000;
  m = s/60;
  h = m/60;
  m %= 60;
  s %= 60;
  sprintf(psz, "%02d%c%02d", h, (f ? ':' : ' '), m);
#endif
}

void getDate(char *psz)
// Code for reading clock date
{
#if USE_DS1307
  char  szBuf[10];
  
  RTC.readTime();
  sprintf(psz, "%d %s %04d", RTC.dd, mon2str(RTC.mm, szBuf, sizeof(szBuf)-1), RTC.yyyy);
#else
  strcpy(szMesg, "29 Feb 2016");
#endif
}

typedef struct 
{
  textEffect_t  effect;   // text effect to display
  char *        psz;      // text string nul terminated
  uint16_t      speed;    // speed multiplier of library default
  uint16_t      pause;    // pause multiplier for library default
} sCatalog;

sCatalog  catalog[] = 
{
  { PA_PRINT, "Hola", 1, 3 },
  { PA_SLICE, "Norberto", 0, 1 },
  { PA_MESH, "Daniel", 10, 2 },
  { PA_FADE, "Schek", 20, 2 },
  { PA_WIPE, "Hola", 3, 1 },
  { PA_WIPE_CURSOR, "Paula", 3, 1 },
  { PA_OPENING, "Cecilia", 2, 1 },
  { PA_OPENING_CURSOR, "Sedano", 3, 1 },
  { PA_CLOSING, "Emanuel", 2, 1 },
  { PA_CLOSING_CURSOR, "Adrian", 3, 1 },
  { PA_BLINDS, "Shuni", 6, 1 },
  { PA_DISSOLVE, "Shuni", 6, 1 },
  { PA_SCROLL_UP, "Chris", 4, 1 },
  { PA_SCROLL_DOWN, "Chris", 4, 1 },
  { PA_SCROLL_LEFT, "Ema", 2, 1 },
  { PA_SCROLL_RIGHT, "Shuni", 2, 1 },
  { PA_SCROLL_UP_LEFT, "Naty", 6, 1 },
  { PA_SCROLL_UP_RIGHT, "Ventana", 6, 1 },
  { PA_SCROLL_DOWN_LEFT, "Vero", 6, 1 },
  { PA_SCROLL_DOWN_RIGHT, "Gian", 6, 1 },
  { PA_SCAN_HORIZ, "Shuni", 3, 1 },
  { PA_SCAN_VERT, "Ema", 2, 1 },
  { PA_GROW_UP, "Guitarra", 6, 1 },
  { PA_GROW_DOWN, "Chris", 6, 1 },
  { PA_SCROLL_LEFT, "Vero", 3, 1 },
  { PA_SCROLL_RIGHT, "Gian", 3, 1 },
  { PA_SCROLL_LEFT, "Paula", 3, 0 },
  { PA_SCROLL_LEFT, "Norbe", 2, 0 },
  { PA_SLICE, "Dios", 0, 1 },
  { PA_SLICE, "Nos", 0, 1 },
  { PA_SLICE, "Bendiga!!!", 0, 1 },
  { PA_SCROLL_LEFT, "Erase una vez un hombre.", 2, 1 },
  { PA_SCROLL_LEFT, "El campo magnetico transversal.", 2, 1 },
};

void setup(void)
{
  P.begin();
  P.setInvert(false);
  P.setZone(0, 0, MAX_DEVICES-5);
  P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  P.setFont(1, numeric7Seg);

  P.displayZoneText(1, szTime, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(0, szMesg, PA_CENTER, SPEED_TIME, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
  
  for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
  {
    catalog[i].speed *= P.getSpeed();
    catalog[i].pause *= 500;
     
  }
  #if USE_DS1307
  RTC.control(DS1307_CLOCK_HALT, DS1307_OFF);
  RTC.control(DS1307_12H, DS1307_OFF);
  #endif

  getTime(szTime);
}


void loop()
{
  funcion1();
  funcion2();
}

void funcion1()
{
 for (uint8_t j=0; j<3; j++)
  {
    textPosition_t  just;
    
    switch (j)
    {
    case 1: just = PA_CENTER;  break;
  
    }
        
    
  for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
    {
      P.displayText(catalog[i].psz, just, catalog[i].speed, catalog[i].pause, catalog[i].effect, catalog[i].effect);

      while (!P.displayAnimate()) 
        ; // animates and returns true when an animation is completed
      
      delay(catalog[i].pause);

    }
   }
  }
 

void funcion2()
{
static uint32_t  lastTime = 0;   // millis() memory
  static uint8_t  display = 0;    // current display mode
  static bool flasher = false;  // seconds passing flasher
  
  P.displayAnimate();
  
  if (P.getZoneStatus(0))
  {
    switch (display)
    {

      case 3: // day of week
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
        display++;
#if USE_DS1307
        dow2str(RTC.dow, szMesg, MAX_MESG);     
#else
        dow2str(4, szMesg, MAX_MESG);
#endif
        break;

      default:  // Calendar
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
        display = 0;
        getDate(szMesg);
        break;
    }
    
    P.displayReset(0); 
  }
  
  // Finally, adjust the time string if we have to
  if (millis() - lastTime >= 1000)
  {
    lastTime = millis();
    getTime(szTime, flasher);
    flasher = !flasher;
    
    P.displayReset(1);
  }   
}

Tu hablas de Parola_Animation_Catalogo pero no dices que es?

Ahora por el código que agregaste, veo que es un código para módulos MAX7219 o sea un cartel de matrices de led.

No se como ayudarte sin tener el hardware delante mío.
Trata de ver para que sirve cada comando de los setup que he combinado.

Esto es Parola Animation, no lo sabía.

El primer código que hace, tienes un video para verlo?

Por favor, indica los enlaces de las librerías que estas usando (usa etiquetas).

Hola, disculpas, ya voy aprendiendo a postear, gracias.

Lo que estoy intentando hacer, es agregar al primer codigo (scroll_catalogo), hora y fecha a travez de

un DS1307 y si lo realizara en scroll seria mas agradable para mi gusto. De aqui, que intento combinar

los dos ejemplos de la libreria de Parola, porque no se como realizar el scroll de la lectura del DS1307.

Si entiendo un tanto lo que hace el setup de cada codigo, te recuerdo que estoy comenzando en este

lenguaje de programacion, pero si he realizado varias pruebas y pude deducir que hace el codigo del

setup. Sucede que no se como combinarlo porque veo que para mostrar el segundo codido (DS1307),

se debe inicializar la matriz en dos mitades (2 zonas) y el primer codigo inicializa en matriz completa.

Es ahi donde veo la dificultad de hacer ambas cosas, es decir, como es posible inicializar primero matriz

completa y luego en 2 zonas. Como combinar los setup ?

Si tu me indicaras como seria el codigo para leer el DS1307 y luego mostrarlo en scroll sobre la matriz,

seria lo que estoy procurando.

Igualmente, procure bastante en la web y observe que mucha gente tiene dificultar para combinar dos

o mas sketches. Creo que mi caso presenta la dificultad de la inicializacion de la matriz como comente

lineas arriba.

Realice dos videos, de lo que hace cada codigo por separado.

Dime, por favor, como te los envio.

Subelos a Youtube y luego coloca los enlaces (usando etiqutas claro) aquí mismo.
Agrega el código que falta tmb.
Y de donde obtuviste la librería.
Yo suelo hacer esto
si mi código tiene una librería con algo raro, simplemente lo digo en el comentario

#include <Parola.h> // http:www.parola.com/donwload

Imagina que todo esto que te puse fuera cierto. Solo muestro como simplemente posteando el código tmb indico de donde saco las librerías.

Hola surbyte,
lo unico que falta en el codigo, es la linea a continuacion:

  P.begin(2);

Aqui, los enlaces de los videos:
Matriz de led_ejemplo de libreria Parola con Arduino 1° parte. - YouTube(YouTube?
v=Yurg7Fg3j_4)

Con respecto a las librerias, tendre que investigar un poco para encontrar de donde las descargue. Esto,
es necesario?, porque si funcionan bien de forma individual.

Espero que mi respuesta sea de acuerdo a tu solicitud.

Gracias por tu tiempo.

Si!! Excelente, en este caso un video muestra mas que las palabras. Muy claro.

Una consulta mas y algo te responderé.
Entonces solo necesitas los setup y no hay nada en el loop?
Porque no pones los dos códigos separados. Código 1 y codigo 2.

Hola surbyte,

Aqui el codigo 1:

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>



// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may 
// need to be adapted
#define	MAX_DEVICES	8
#define	CLK_PIN		52
#define	DATA_PIN	51
#define	CS_PIN	  45


// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)

#define  SPEED_TIME  5
#define PAUSE_TIME  10

typedef struct 
{
  textEffect_t  effect;   // text effect to display
  char *        psz;      // text string nul terminated
  uint16_t      speed;    // speed multiplier of library default
  uint16_t      pause;    // pause multiplier for library default
} sCatalog;

sCatalog  catalog[] = 
{
  
  { PA_PRINT, "Hola", 1, 3 },
  { PA_SLICE, "Norberto", 0, 1 },
  { PA_MESH, "Daniel", 10, 2 },
  { PA_FADE, "Schek", 20, 2 },
  { PA_WIPE, "Hola", 3, 1 },
  { PA_WIPE_CURSOR, "Paula", 3, 1 },
  { PA_OPENING, "Cecilia", 2, 1 },
  { PA_OPENING_CURSOR, "Sedano", 3, 1 },
  { PA_CLOSING, "Emanuel", 2, 1 },
  { PA_CLOSING_CURSOR, "Adrian", 3, 1 },
  { PA_BLINDS, "Shuni", 6, 1 },
  { PA_DISSOLVE, "Shuni", 6, 1 },
  { PA_SCROLL_UP, "Chris", 4, 1 },
  { PA_SCROLL_DOWN, "Chris", 4, 1 },
  { PA_SCROLL_LEFT, "Ema", 2, 1 },
  { PA_SCROLL_RIGHT, "Shuni", 2, 1 },
  { PA_SCROLL_UP_LEFT, "Naty", 6, 1 },
  { PA_SCROLL_UP_RIGHT, "Ventana", 6, 1 },
  { PA_SCROLL_DOWN_LEFT, "Vero", 6, 1 },
  { PA_SCROLL_DOWN_RIGHT, "Gian", 6, 1 },
  { PA_SCAN_HORIZ, "Shuni", 3, 1 },
  { PA_SCAN_VERT, "Ema", 2, 1 },
  { PA_GROW_UP, "Guitarra", 6, 1 },
  { PA_GROW_DOWN, "Chris", 6, 1 },
  { PA_SCROLL_LEFT, "Vero", 3, 1 },
  { PA_SCROLL_RIGHT, "Gian", 3, 1 },
  { PA_SCROLL_LEFT, "Paula", 3, 0 },
  { PA_SCROLL_LEFT, "Norbe", 2, 0 },
  { PA_SLICE, "Dios", 0, 1 },
  { PA_SLICE, "Nos", 0, 1 },
  { PA_SLICE, "Bendiga!!!", 0, 1 },
  { PA_SCROLL_LEFT, "Erase una vez un hombre.", 2, 1 },
  { PA_SCROLL_LEFT, "El campo magnetico transversal.", 2, 1 },
  };

void setup(void)
{
  P.begin();
  P.setInvert(false);
 
  
  for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
  {
    catalog[i].speed *= P.getSpeed();
    catalog[i].pause *= 500;
     
  }
}


void loop()
{
 
 for (uint8_t j=0; j<3; j++)
  {
    textPosition_t  just;
    
    switch (j)
    {
    case 1: just = PA_CENTER;  break;
  
    }
        
    
  for (uint8_t i=0; i<ARRAY_SIZE(catalog); i++)
    {
      P.displayText(catalog[i].psz, just, catalog[i].speed, catalog[i].pause, catalog[i].effect, catalog[i].effect);

      while (!P.displayAnimate()) 
        ; // animates and returns true when an animation is completed
      
      delay(catalog[i].pause);

    }
   }
  }

Aqui el codigo 2:

// Use the DS1307 clock module
#define	USE_DS1307	1

// Header file includes
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

#include "Font_Data.h"

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may 
// need to be adapted
#define	MAX_DEVICES	8

#define	CLK_PIN		52
#define	DATA_PIN	51
#define	CS_PIN		45





#if	USE_DS1307
#include <MD_DS1307.h>
#include <Wire.h>
#endif

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// Arbitrary output pins
// MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

#define	SPEED_TIME	75
#define	PAUSE_TIME	0

#define	MAX_MESG	20

// Turn on debug statements to the serial output
#define  DEBUG  0

// Global variables
char	szTime[9];		// mm:ss\0
char	szMesg[MAX_MESG+1] = "";


char *mon2str(uint8_t mon, char *psz, uint8_t len)

// Get a label from PROGMEM into a char array
{
  static const __FlashStringHelper*	str[] = 
  {
    F("Jan"), F("Feb"), F("Mar"), F("Apr"), 
    F("May"), F("Jun"), F("Jul"), F("Aug"), 
    F("Sep"), F("Oct"), F("Nov"), F("Dec")
  };

  strncpy_P(psz, (const char PROGMEM *)str[mon-1], len);
  psz[len] = '\0';

  return(psz);
}

char *dow2str(uint8_t code, char *psz, uint8_t len)
{
  static const __FlashStringHelper*	str[] = 
  {
    F("Sunday"), F("Monday"), F("Tuesday"), 
    F("Wednesday"), F("Thursday"), F("Friday"), 
    F("Saturday")
  };
  
  strncpy_P(psz, (const char PROGMEM *)str[code-1], len);
  psz[len] = '\0';

  return(psz);
}

void getTime(char *psz, bool f = true)
// Code for reading clock time
{
#if	USE_DS1307
  RTC.readTime();
  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m);
#else
  uint16_t	h, m, s;
	
  s = millis()/1000;
  m = s/60;
  h = m/60;
  m %= 60;
  s %= 60;
  sprintf(psz, "%02d%c%02d", h, (f ? ':' : ' '), m);
#endif
}

void getDate(char *psz)
// Code for reading clock date
{
#if	USE_DS1307
  char	szBuf[10];
	
  RTC.readTime();
  sprintf(psz, "%d %s %04d", RTC.dd, mon2str(RTC.mm, szBuf, sizeof(szBuf)-1), RTC.yyyy);
#else
  strcpy(szMesg, "29 Feb 2016");
#endif
}

void setup(void)
{
  P.begin(2);
  P.setInvert(false);
  
  P.setZone(0, 0, MAX_DEVICES-5);
  P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  P.setFont(1, numeric7Seg);

  P.displayZoneText(1, szTime, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(0, szMesg, PA_CENTER, SPEED_TIME, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
  
 

#if USE_DS1307
  RTC.control(DS1307_CLOCK_HALT, DS1307_OFF);
  RTC.control(DS1307_12H, DS1307_OFF);
#endif

  getTime(szTime);
}

void loop(void)
{
  static uint32_t	lastTime = 0;		// millis() memory
  static uint8_t	display = 0;		// current display mode
  static bool	flasher = false;	// seconds passing flasher
  
  P.displayAnimate();
  
  if (P.getZoneStatus(0))
  {
    switch (display)
    {

      case 3:	// day of week
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
        display++;
#if	USE_DS1307
        dow2str(RTC.dow, szMesg, MAX_MESG);			
#else
        dow2str(4, szMesg, MAX_MESG);
#endif
        break;

      default:	// Calendar
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
        display = 0;
        getDate(szMesg);
        break;
    }
		
    P.displayReset(0); 
  }
  
  // Finally, adjust the time string if we have to
  if (millis() - lastTime >= 1000)
  {
    lastTime = millis();
    getTime(szTime, flasher);
    flasher = !flasher;
	  
    P.displayReset(1);
  }
}

Mejor aun, si los datos del DS1307 pueden mostrarse en scroll, donde no habria necesidad de dividir en dos la matriz.
Por ejemplo a continuacion del ultimo efecto del catalogo, si estas de acuerdo?
Por el contrario seria, mostrar todo el catalogo y luego los datos del Ds1307, donde habria que esperar un tiempo para visualizar hora y calendario y volver al catalogo para que sea ciclico.

Gracias, un saludo !

Hola surbyte, buenas noches.

Adjunto los link de descarga de las librerias que utilice.
De ser necesario, tengo las librerias en zip, si las requieres, dime como te las envio.

Gracias de nuevo y un saludo.

https://majicdesigns.github.io/MD_MAX72XX/_m_d___m_a_x72xx_8h.html

Bueno ya reproduje bastante parecido lo que muestras en el display.
Ahora intenta explicarme que quieres..
La hora aparece en una zona a la izquierda, eso esta bien?
Los nombres a la derecha, misma consulta.

Hola surbyte, siempre gracias por tu ayuda !

Lo que quiero es reproducir todo el catalogo de nombres, centrado en la matriz, tal cual el primer video que te envie. Luego, cuando finaliza la reproduccion del catalogo; reproducir en scroll la hora y a continuacion la fecha, es decir, los datos leidos del DS1307, para luego volver a la reproduccion del catalogo y asi sea ciclico.

De poder verlo asi seria un golazo.

Aguardo tus indicaciones.

Un saludo.

Ahhh ya entiendo... todo el cátalogo y luego la hora, cuanto tiempo ?
El catalogo demorara un buen tiempo luego la hora por un lapso y vuelves al catálogo?

Si, exactamente, es lo que me llevo a hacer la consulta en el foro.
Luego de ver este funcionamiento, talvez, intentare reproducir hora y calendario en scroll, como mensione anteriormente.

Un saludo !

Buenas tardes, ahora tengo algo de tiempo para exponer como se resolvio mi caso.

El Señor surbyte realizo la combinacion de ambos codigos/sketches y finalmente la matriz reprodujo
en scroll, los datos leidos en el DS1307, que era mi objetivo.

Mis respetos y reconocimiento a la gran ayuda brindada por surbyte !!!

Encuentro interesante tambien, agregar a este proyecto, la reproduccion de datos sobre la matriz, obtenidos de la lectura de una microSD y porque no, tambien el envio de datos por bluetooth.

Dejo entonces esta consulta/propuesta para ver que se puede hacer al respecto.

Muy agradecido y estoy atento a la continuacion del hilo.

Saludos.

Hola a todos, vuelvo con este codigo que realiza la lectura de una microSD, el cual he probado colocando un archivo en la microSD con la PC y luego visualizarlo en el monitor serial, sin problemas.

Ahora lo que quisiera hacer, es, leer el archivo de texto que contiene la microSD y mostrarlo en la matriz de led, pero no se como hacer ese proceso.

Desde ya agradecido !

Saludos srubyte !

#include <SPI.h>
#include <SD.h>


File myFile;
void setup() {
 
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.print("Initializing SD card...");

  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");

  myFile = SD.open("prueba.txt");
  if (myFile) {
    Serial.println("prueba.txt:");

    // read from the file until there's nothing else in it:
    while (myFile.available()) {
      Serial.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening prueba.txt");
  }
}

void loop() {
  // nothing happens after setup
}