#include "rtc.h"
reloj relojito;
#include "JSON.h"
jsonFactory jsonfact;
#include "microSD.h"
MicroSD MSD;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
relojito.configRTC();
MSD.MicroSD_init();
//Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
relojito.getTime();
relojito.getDate();
delay ( 2000 ); // this speeds up the simulation
Serial.println("Guardando en MicroSD...");
MSD.SaveFile (jsonfact.jsonmake(relojito.hora, relojito.fecha));
delay ( 500 );
Serial.println("Leyendo MicroSD...");
MSD.ReadFile ( );
}