Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: robiv8 on Sep 17, 2017, 09:58 pm

Title: [discontinued] Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 17, 2017, 09:58 pm
Hallo everybody,
i need help with this code.
The code is working but i need seconds too. hh:mm:ss
How can i resolve this.

Thanks for help


Code: [Select]

// 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"

#if USE_GENERIC_HW || USE_PAROLA_HW
#define INVERT_UPPER_ZONE
#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_ZONES 2
#define ZONE_SIZE 8
#define MAX_DEVICES (MAX_ZONES * ZONE_SIZE)
//#define MAX_DEVICES 16

#define ZONE_UPPER  1
#define ZONE_LOWER  0

#define CLK_PIN   14
#define DATA_PIN  13
#define CS_PIN    15

#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  10

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

// Global variables
char  szTimeL[MAX_MESG];    // mm:ss\0
char  szTimeH[MAX_MESG];

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

void createHString(char *pH, char *pL)
{
  for (; *pL != '\0'; pL++)
    *pH++ = *pL | 0x80;   // offset character

  *pH = '\0'; // terminate the string
}

void setup(void)
{
  // initialise the LED display
  P.begin(MAX_ZONES);

  // Set up zones for 2 halves of the display
  P.setZone(ZONE_LOWER, 0, ZONE_SIZE - 1);
  P.setZone(ZONE_UPPER, ZONE_SIZE, MAX_DEVICES - 1);
  P.setFont(numeric7SegDouble);

  P.setCharSpacing(P.getCharSpacing() * 2); // double height --> double spacing

#ifdef INVERT_UPPER_ZONE
  P.setZoneEffect(ZONE_UPPER, true, PA_FLIP_UD);
  P.setZoneEffect(ZONE_UPPER, true, PA_FLIP_LR);

  P.displayZoneText(ZONE_LOWER, szTimeL, PA_RIGHT, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(ZONE_UPPER, szTimeH, PA_LEFT, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
#else
  P.displayZoneText(ZONE_LOWER, szTimeL, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(ZONE_UPPER, szTimeH, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
#endif

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

void loop(void)
{
  static uint32_t lastTime = 0; // millis() memory
  static bool flasher = false;  // seconds passing flasher

  P.displayAnimate();
  P.setIntensity(1); // Display Intensity
  if (P.getZoneStatus(ZONE_LOWER) && P.getZoneStatus(ZONE_UPPER))
  {
    // Adjust the time string if we have to. It will be adjusted
    // every second at least for the flashing colon separator.
    if (millis() - lastTime >= 1000)
    {
      lastTime = millis();
      getTime(szTimeL, flasher);
      createHString(szTimeH, szTimeL);
      flasher = !flasher;

      P.displayReset();

      // synchronise the start
      P.synchZoneStart();
    }
  }
}
Title: Re: Need help for a clock with Parola Double Height
Post by: PaulRB on Sep 18, 2017, 02:33 pm
Are you using a ds1307?

Code: [Select]

void getTime(char *psz, bool f = true)
// Code for reading clock time
// Simulated clock runs 1 minute every second
{
#if USE_DS1307
  RTC.readTime();
  sprintf(psz, "%02d%c%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m, (f ? ':' : ' '), RTC.s);
#else
  uint16_t  h, m, s;
 
  m = millis()/1000;
  h = (m/60) % 24;
  m %= 60;
  sprintf(psz, "%02d%c%02d%c%02d", h, (f ? ':' : ' '), m, (f ? ':' : ' '), s);
#endif
}
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 18, 2017, 10:36 pm
Hallo,
yes! a DS3231 and works fine and show the correct time

Thank you for the code, it works :-)
But 1 more problem.
The whole time does not fit anymore.
It is offset by one and a half segments. How do I get this fixed.
Has something to do with the font?
I have 2 pictures attached, the first as it comes and the second when I move the segments.
Title: Re: Need help for a clock with Parola Double Height
Post by: PaulRB on Sep 18, 2017, 11:20 pm
(https://forum.arduino.cc/index.php?action=dlattach;topic=500725.0;attach=226396)
(https://forum.arduino.cc/index.php?action=dlattach;topic=500725.0;attach=226398)
Title: Re: Need help for a clock with Parola Double Height
Post by: PaulRB on Sep 19, 2017, 08:09 am
Maybe try increasing MAX_MESG by a few more characters. But in theory it should be enough already.

You need someone expert in Parola library to help you.
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Sep 19, 2017, 12:19 pm
Try using a fixed width font instead of a variable spaced font. when you invert the top section variable spaced may not line up.  You can also try left or right justify rather than centered so that the time lines up on one edge.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 19, 2017, 08:47 pm
Thanks to both for the support.
I have no idea of programming, but will try.
Is there any finished fonts I can test?

If the font was only slightly narrower, it would fit.
And if I knew how I could shorten the code in the "Font_Data.h" I would do that.
Is there an online tool where I can create the ones and it me the values which I can then enter or replace?
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Sep 19, 2017, 09:13 pm
Look at the documentation for MD_Max72xx library, especially around fonts. There is a font builder with the library.

Also look at the blog site next to my ID block on the left and search for "Parola A to Z", there are a few articles on how to use and also about double height displays.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 19, 2017, 09:29 pm
OK Thank you.
I will search and look at your hints.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 19, 2017, 10:20 pm
So is there a newer Parola MD_MAX72xx Font Builder v1
In my missing the "Double Height Enabled" Checkbox.

There is in Work Sheet only Project:, Show all and Copy to Clipboard


THX

Sorry i found the V2 :-)
But it is only for Windows! and i am a Mac user :-)
And yes! Windows, because it is Activ X required.
So i must search these days a windows PC in my Office and hope i have rights for Activ X
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Sep 19, 2017, 10:34 pm
Where did you get the library from? Please download the latest copy from my distribution site on Github. Or use the library manager in the ide to download.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 20, 2017, 12:49 pm
OK I looked at it and realized that it is too high for me. I do not understand that. So this has been done and I give up. Maybe I'll find another solution.
I thank you for your support.
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Sep 20, 2017, 12:54 pm
Sorry to hear that but if you are a beginner maybe you should start with a single height display first.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 21, 2017, 09:18 pm
news :: news :: news :: news

I wrote: Maybe I'll find another solution.
And I found one. I have buy two more modules and now i have room for the whole time.

But i will maybe soon still need your help ;-)

I have a clock built with 8Dig7Segment which takes itself by Wlan and Ntp the time and brings into the RTC. If no Wlan is on then it takes the time from the RTC.
This works excellently.
So!
And now I would like this with my big clock.
If I do not go further I ask here :-)

regards
Robert
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Sep 22, 2017, 05:58 pm
So that I do not spend nights with it for free, is there a chance to implement the code from Post1 into this sketch without great programing? This I also use for my 8dig7segment display. But there runs with LedControl :-(
Thanks Robert
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 02, 2017, 11:17 pm
1 week no answer!
Nobody can help me?
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 03, 2017, 12:43 am
I can't understand the question and I suppose others cannot either.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 03, 2017, 12:53 pm
Oh sorry! My english is bad.
So one more try.

I have built a watch with 8Dig7Segment LED, the time it takes from the RTC. The RTC is updated with Wlan and Ntp. If no Wlan is present, it continues to take the time out of the RTC.
This works excellently.
The 3 used ino files I have attached.
And now I want this with my big clock.

And now the question!
How can I install the code from my 1 post, for the double height clock in this way-set-rtc-via-wifi-german-matrix.ino?

Thanks
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 03, 2017, 11:41 pm
That depends entirely on how well the code is written. If is is well structured and has isolation between the different parts (ie, the display part is quite separate from the clock/time/internet parts) then it will be a straightforward job. If the code is 'spaghetti' this will be more complex and take longer.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 04, 2017, 12:15 am
Hello Marco,
exactly what I meant, since I am no programmer would be nice if someone tells me whether the code is spaghetti or it is relatively easy to implement. Then I would also dare to try.
In my post no.14 I attached the sketch. That would be the weg-set-rtc-via-wifi_Deutsch_matrix.ino, in which should be installed.
If you could look at this and give me a tip would be great.
Thank you
Robert
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 04, 2017, 12:45 am
There is very little in the code you pointed me to (2 functions), so I would guess that including the matrix should be a straightforward job.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 04, 2017, 01:04 am
Thanks, I'll try it.
My only problem is that in my sketch the DS3231 is used and in the Parola Sketch the DS1307
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 04, 2017, 01:08 am
Those 2 clock modules are interchangeable for the basic RTC function.

DS3231 has built-in alarms that are not in the other. If you are worried get the DS3231 library from my libraries repo. Function calls are the same so it should be a drop in replacement with minimal changes.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 04, 2017, 01:21 am
You mean the MD DS3231.h instead of the MD DS1307.h?
So i have changed the DS1307 to MD_DS3231

and become this error:
Arduino: 1.8.5 Hourly Build 2017/08/28 06:12 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

Build-Optionen wurden verändert, alles wird neu kompiliert
Archiving built core (caching) in: /var/folders/l9/27pqv_zs4zd0xmpx_03blk_m0000gn/T/arduino_cache_641022/core/core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,UploadSpeed_115200,FlashSize_4M3M_e66f26f0b9de883465923b4da1419c23.a
libraries/MD_DS3231-master/MD_DS3231.cpp.o:(.bss.bufRTC+0x0): multiple definition of `bufRTC'
libraries/MD_Parola-master/MD_DS1307.cpp.o:(.bss.bufRTC+0x0): first defined here
libraries/MD_DS3231-master/MD_DS3231.cpp.o:(.bss.RTC+0x0): multiple definition of `RTC'
libraries/MD_Parola-master/MD_DS1307.cpp.o:(.bss.RTC+0x0): first defined here
/Users/robi/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: Warning: size of symbol `RTC' changed from 10 in libraries/MD_Parola-master/MD_DS1307.cpp.o to 24 in libraries/MD_DS3231-master/MD_DS3231.cpp.o
collect2: error: ld returned 1 exit status
exit status 1
Fehler beim Kompilieren für das Board NodeMCU 1.0 (ESP-12E Module).

The Sketch:

Code: [Select]

/ Use the DS3231 clock module
#define  USE_DS3231  1

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

#if USE_GENERIC_HW || USE_PAROLA_HW
#define INVERT_UPPER_ZONE
#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_ZONES 2
#define ZONE_SIZE 12
#define MAX_DEVICES (MAX_ZONES * ZONE_SIZE)
//#define MAX_DEVICES 16

#define ZONE_UPPER  1
#define ZONE_LOWER  0

#define CLK_PIN  14 // D6
#define DIN_PIN  13 // D8
#define CS_PIN   15 // D7

#if USE_DS3231
#include <MD_DS3231.h>
#include <Wire.h>
#endif

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

#define SPEED_TIME  75
#define PAUSE_TIME  0

#define MAX_MESG  10

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

// Global variables
char  szTimeL[MAX_MESG];    // mm:ss\0
char  szTimeH[MAX_MESG];

void getTime(char *psz, bool f = true)
// Code for reading clock time

// HH:MM:SS Von mir !
{
#if USE_DS3231
  RTC.readTime();
  sprintf(psz, "%02d%c%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m, (f ? ':' : ' '), RTC.s);
#else
  uint16_t  h, m, s;
 
  m = millis()/1000;
  h = (m/60) % 24;
  m %= 60;
  sprintf(psz, "%02d%c%02d%c%02d", h, (f ? ':' : ' '), m, (f ? ':' : ' '), s);
#endif
}

void createHString(char *pH, char *pL)
{
  for (; *pL != '\0'; pL++)
    *pH++ = *pL | 0x80;   // offset character

  *pH = '\0'; // terminate the string
}

void setup(void)
{
  // initialise the LED display
  P.begin(MAX_ZONES);

  // Set up zones for 2 halves of the display
  P.setZone(ZONE_LOWER, 0, ZONE_SIZE - 1);
  P.setZone(ZONE_UPPER, ZONE_SIZE, MAX_DEVICES - 1);
  P.setFont(numeric7SegDouble);
//  P.setFont(BigFontBottom);
  P.setCharSpacing(P.getCharSpacing() * 2); // double height --> double spacing

#ifdef INVERT_UPPER_ZONE
  P.setZoneEffect(ZONE_UPPER, true, PA_FLIP_UD);
  P.setZoneEffect(ZONE_UPPER, true, PA_FLIP_LR);

  P.displayZoneText(ZONE_LOWER, szTimeL, PA_RIGHT, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(ZONE_UPPER, szTimeH, PA_LEFT, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
#else
  P.displayZoneText(ZONE_LOWER, szTimeL, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(ZONE_UPPER, szTimeH, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
#endif

#if USE_DS3231
  RTC.control(DS3231_CLOCK_HALT, DS3231_OFF);
  RTC.control(DS3231_12H, DS3231_OFF);
#endif
}

void loop(void)
{
  static uint32_t lastTime = 0; // millis() memory
  static bool flasher = false;  // seconds passing flasher

  P.displayAnimate();
  P.setIntensity(1); // Display Intensity
  if (P.getZoneStatus(ZONE_LOWER) && P.getZoneStatus(ZONE_UPPER))
  {
    // Adjust the time string if we have to. It will be adjusted
    // every second at least for the flashing colon separator.
    if (millis() - lastTime >= 1000)
    {
      lastTime = millis();
      getTime(szTimeL, flasher);
      createHString(szTimeH, szTimeL);
      flasher = !flasher;

      P.displayReset();

      // synchronise the start
      P.synchZoneStart();
    }
  }
}
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 04, 2017, 02:35 am
If you can't resolve those errors yourself, then please just use the DS1307 library.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 04, 2017, 09:05 pm
Pity, had the hope that it would simply be exchangeable as you said.
Since I have as I have no idea of programming, I do not know where to change what would be the error message.
Any tip?
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 06, 2017, 05:28 pm
So! With a little help in a other forum i have resolved the code error problem.
The Sketch is now using the DS3231
I have also edited the font. :-)

Now i will try to implement this code in my Sketch.

(https://forum.arduino.cc/index.php?action=dlattach;topic=500725.0;attach=228708)
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 06, 2017, 07:54 pm
I realize that the parola code runs with the MD_DS3231.h. My sketch runs with the DS3231.h

How can i fix this? Can you give me a hint.

Here are my code what i am building, it is work and the serial Monitor says Wlan is connected and the time is set. But the Clock starts with 00:00:00
I mean it is because the DS3231 is set by ntp and not the MD_DS3231

Code: [Select]

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <DS3231.h>
#include <Wire.h>
#include <TimeLib.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#include "Font_Data2.h"

const char *ssid = "Daisy*****";
const char *password ="12345*****";

// NTP Servers:
//IPAddress timeServer(192, 168, 179, 1);  //meine.fritz.box //(192, 168, 179, 1);
IPAddress timeServer(192, 53, 103, 108);  //ptbtime1.ptb.de //(192, 43, 244, 18);

WiFiUDP Udp; // A UDP instance to let us send and receive packets over UDP
unsigned int localPort = 8888;      // local port to listen for UDP packets

const int timeZone = 1;     // Central European Time
//const int timeZone = -5;  // Eastern Standard Time (USA)

//DS3231-Clock
DS3231 Clock;
bool Century=false;
bool h12;
bool PM;

#if USE_GENERIC_HW || USE_PAROLA_HW
#define INVERT_UPPER_ZONE
#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_ZONES 2
#define ZONE_SIZE 12
#define MAX_DEVICES (MAX_ZONES * ZONE_SIZE)
//#define MAX_DEVICES 16

#define ZONE_UPPER  1
#define ZONE_LOWER  0

#define CLK_PIN  14 // D6
#define DIN_PIN  13 // D8
#define CS_PIN   15 // D7

#if USE_DS3231
#include <MD_DS3231.h>
#include <Wire.h>
#endif

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

#define SPEED_TIME  75
#define PAUSE_TIME  0

#define MAX_MESG  10

// ################################# MAX7219 ##########################

// Global variables
char  szTimeL[MAX_MESG];    // mm:ss\0
char  szTimeH[MAX_MESG];

void getTime(char *psz, bool f = true)
// Code for reading clock time

// HH:MM:SS By me !
{
#if USE_DS3231
  RTC.readTime();
  sprintf(psz, "%02d%c%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m, (f ? ':' : ' '), RTC.s);
#else
  uint16_t  h, m, s;
 
  m = millis()/1000;
  h = (m/60) % 24;
  m %= 60;
  sprintf(psz, "%02d%c%02d%c%02d", h, (f ? ':' : ' '), m, (f ? ':' : ' '), s);
#endif
}

void createHString(char *pH, char *pL)
{
  for (; *pL != '\0'; pL++)
    *pH++ = *pL | 0x80;   // offset character

  *pH = '\0'; // terminate the string
}

boolean cleared = false;

void setup() {
  //clock
    Wire.begin(); //clock communication
    Serial.begin(115200);
  //display
 
  String errormessage ="";
 
  //scan for networks
  if(scan_for_network(errormessage) == true)
  {
    //network found
    Serial.println("Netzwerk " + String(ssid) + " gefunden");
    //try connecting to network
    if(connect_to_network() == true)
    {
      //connected to network
      Serial.println("Mit Netzwerk " + String(ssid) + " verbunden");
      Serial.println("IP address: ");
      Serial.println(WiFi.localIP());

      Serial.println("Starting UDP");
      Udp.begin(localPort);
      Serial.print("Local port: ");
      Serial.println(Udp.localPort());
     
      //set clock
      if(settime()==true)
      {
        //Clock has been set
        WiFi.disconnect();
        Serial.println("Die Uhrzeit wurde gesetzt: " + String(Clock.getHour(h12,PM)) + ":" + String(Clock.getMinute()));
        delay(500);
      }
      else
      {
        Serial.println("Could not set the RTC.");
      }
    }
    else
    {
      Serial.println("Netzwerkname gefunden, es konnte keine Verbindung hergestellt werden. Falsches Passwort?");
    }
  }
  else
  {
     Serial.println(errormessage);
  }
// initialise the LED display
  P.begin(MAX_ZONES);

  // Set up zones for 2 halves of the display
  P.setZone(ZONE_LOWER, 0, ZONE_SIZE - 1);
  P.setZone(ZONE_UPPER, ZONE_SIZE, MAX_DEVICES - 1);
  P.setFont(numeric7SegDouble);
//  P.setFont(BigFontBottom);
  P.setCharSpacing(P.getCharSpacing() * 2); // double height --> double spacing

#ifdef INVERT_UPPER_ZONE
  P.setZoneEffect(ZONE_UPPER, true, PA_FLIP_UD);
  P.setZoneEffect(ZONE_UPPER, true, PA_FLIP_LR);

  P.displayZoneText(ZONE_LOWER, szTimeL, PA_RIGHT, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(ZONE_UPPER, szTimeH, PA_LEFT, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
#else
  P.displayZoneText(ZONE_LOWER, szTimeL, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
  P.displayZoneText(ZONE_UPPER, szTimeH, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_PRINT, PA_NO_EFFECT);
#endif

#if USE_DS3231
  RTC.control(DS3231_CLOCK_HALT, DS3231_OFF);
  RTC.control(DS3231_12H, DS3231_OFF);
#endif

}

//main loop: show time, add your own code to display it
void loop()
{
  static uint32_t lastTime = 0; // millis() memory
  static bool flasher = false;  // seconds passing flasher

  P.displayAnimate();
  P.setIntensity(1); // Display Intensity
  if (P.getZoneStatus(ZONE_LOWER) && P.getZoneStatus(ZONE_UPPER))
  {
    // Adjust the time string if we have to. It will be adjusted
    // every second at least for the flashing colon separator.
    if (millis() - lastTime >= 1000)
    {
      lastTime = millis();
      getTime(szTimeL, flasher);
      createHString(szTimeH, szTimeL);
      flasher = !flasher;

      P.displayReset();

      // synchronise the start
      P.synchZoneStart();
    }
  }
}

Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 07, 2017, 05:17 am
The library you use makes no difference to the way the clock works.

The RTC will start at 0 unless you have a battery back up for the time. Once set it should continue to work until the power is removed.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 07, 2017, 11:28 am
Trank for your coment,
The DS3231 is working good without the Parola code. So its in good condition and the Batterie is new and full.

The DS3231 gets also the right time set, which I can examine if I attach it at another clock without Wlan.
I mean the problem is not the RTC but the code or MD_DS3231.
I believe the DS3231 and MD_DS3231 interfere with each other.?

Have you looked at the code times briefly?
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 07, 2017, 12:18 pm
Use one library or the other, do not use both. You will need to change the code to suit. Please read the documentation to work out what similar functions are for the different RTC libraries.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 07, 2017, 12:47 pm
Where can I find the documentation for MD_DS3231?
or otherwise asked!
Where is the code with the RTC.readTime ()
If I would change that then I could omit the MD_DS3231 and the DS3231 use.
Since you say the two back on the same values.

PS.
what I noticed lately, why are standard functions in the code changed so that the existing is not usable. Do not misunderstand, I just want to understand it.
As an example: Can the MD_DS3231 code be more than the DS3231, or why is what own used.?

And thanks for your patience! :-)
Title: Re: Need help for a clock with Parola Double Height
Post by: marco_c on Oct 07, 2017, 08:59 pm
Quote
Where can I find the documentation for MD_DS3231?
In the docs folder where you have installed the library (open index.html) and also a link online usually from the displayed README.MD on the repository front page.
For undocumented libraries you need to read the header file to work out what functions are available.

Quote
why are standard functions in the code changed so that the existing is not usable.
This is a misunderstanding. The only standard functions are those supplied with the arduino official library. Everything else is a contribution by volunteers who do their own work and make it available for others. You will find there are lots of libraries to do similar things with more or less functionality, speed, ease-of-use, etc. As the programmer you need to find one you like and use that.
Title: Re: Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 08, 2017, 12:10 am
Thanks for trying to help me, but that's too high for me.
I do not know where to start.
Thanks again
Title: Re: [discontinued] Need help for a clock with Parola Double Height
Post by: Else on Oct 14, 2017, 10:02 pm
Hello
Very interesting clock
Did you solve the problem already?
Title: Re: [discontinued] Need help for a clock with Parola Double Height
Post by: robiv8 on Oct 15, 2017, 08:25 pm
No, since I can not program, I get the problem also not solved.
I do not know where to start.
No matter!
Maybe somebody will have mercy on me sometime and help me. Even though I can not program.
Apart from Marco, he has other things to do than to complete the code. :-)
Is not life-important.
Title: Re: [discontinued] Need help for a clock with Parola Double Height
Post by: brunogerez on Oct 09, 2019, 03:09 pm
hello I would like to know how you enlarged the lyrics? sorry for my bad english
Title: Re: [discontinued] Need help for a clock with Parola Double Height
Post by: brunogerez on Oct 09, 2019, 04:50 pm
hello I would like to know how you enlarged the lyrics? sorry for my bad english