avaldebe / UxTClib

ctime clock library for ESP8266 and ESP32
MIT License
3 stars 1 forks source link

Newbie needs for a word clock an clock module for the with the PCF8563 #6

Closed fluefiske closed 5 years ago

fluefiske commented 5 years ago

Hey guys,

I am really no coder and have some difficulty's with some piece of code so hopefully someone can help me.

I have a working piece of code for an DCF DS3231 however I would like to make it work for a PCF8563 is there someone who can help me with that?

Working piece of code for an DS3231: //-------------------------------------------- // DS3231 CLOCK MODULE //--------------------------------------------

DS3231 clock; RTCDateTime dt; RTC_DS3231 RTC;

char time_s[9]; char date_s[11];

bool oldState = HIGH; // for switch // boolean state; // need for 1 Hz pulse

int Led_Aan[168]; // between array uint32_t FunkBlue = pixels.Color(0, 0, 125); uint32_t FunkGreen = pixels.Color(0, 125, 0); uint32_t FunkRed = pixels.Color(125, 0, 0); uint32_t FunkBlack = pixels.Color(0, 0, 0); uint32_t FunkColor; int initFunk = 1;

uint32_t SmileyColor1 = pixels.Color(0, 0, 0); // black color and brightness of the smiley here to adjust uint32_t SmileyColor2 = pixels.Color(150, 150, 150); // white uint32_t SmileyColor3 = pixels.Color(110, 110, 0); // yellow uint32_t SmileyColor4 = pixels.Color(0, 0, 140); // blue uint32_t SmileyColor5 = pixels.Color(140, 0, 0); // red

int uren = 0 ; int minuten = 0 ; int DCFcheckuur = 04; // synchronize time with DCF77 time once a day at 04:10 int DCFcheckmin = 10; // in hours and minutes

int newTime ; // storage of new second int oldTime ; // storage from previous second

int Power_On_Counter = 0; // teller van aantal seconde after motion detection door RCWL-0516 module int Power_On_Time = 900; // uitschakelen na x seconde after motion detection door RCWL-0516 module (900 seconde is 15 minuten) int RADAR_In = 1; // begin waarde is aan

int LDRValue = 50; // result of reading the analog pin int BerLDRValue = 50; // Berekende waarde int xy = 0;

byte knipper = 0 ; // seconde bepalen

float j = 1; // LED on int d = 1; // d = j as integer byte k = 0; // loop across the LED array byte m = 0; // number of the led byte e = 0; // counter for number of LEDs that are on byte f = 0; // f = alternative LED number in the row of the number that is on instead of the number of LEDs 168

byte Smileycount = 0; // number of movement before smiley comes up byte smil = 0; // counter only once per loop byte emo = 0; // emoticon figuur knipoog of tong byte s = 0; // loop across the LED array smiley

time_t time;

DCF77 DCF = DCF77(DCF_PIN, DCF_INTERRUPT);

Thank in advance,

André

avaldebe commented 5 years ago

Hi @fluefiske This seems the wrong place to ask this question:

You might have better luck asking on stackoverflow.com

On the code you posted only 6 lines of your code are about the DS3231 clock, all of them setup. In order to get help, here or elsewhere, you need to post the relevant code.