You are reading a single comment by @werty1st and its replies. Click here to read the full conversation.
  • Hi Gordon,

    i use the receiver from Conrad. It is a little bit different from the one on Pollin.

    i tried your sample code:

    require("DCF77").connect(B5, function(err, date, info) {
      if (err)
        console.log("Invalid time received: " + err);
      else
        console.log(date.toString(), info);
    });
    
    

    But i haven't got any valid results. So i tried the dcf77 library from (http://thijs.elenbaas.net/2012/04/arduinĀ­o-dcf77-radio-clock-receiver-library/)
    with an arduino one.

    At the beginning i didn't get valid result there either, but then i tested his debug code.
    i saw that his pulsewitdh differed from mine.

    he had 130 and 230ms.
    on my side the pulses where 80 and 180ms:

    Cycle: 904 Pulse :185
    Cycle: 999 Pulse :88
    Cycle: 1002 Pulse :84
    Cycle: 992 Pulse :191
    Cycle: 1008 Pulse :87
    Cycle: 1007 Pulse :178
    

    After i changed the DCFSplitTime from 180 to 120 in his dcf77.h...

    _#define DCFSplitTime 120
    

    ... i got a vaild time.

    Waiting for DCF77 time ... 
    It will take at least 2 minutes until a first update can be processed.
    0:00:01 1 1 1970
    0:00:02 1 1 1970
    0:00:03 1 1 1970
    0:00:04 1 1 1970
    0:00:05 1 1 1970
    0:00:06 1 1 1970
    ...
    0:02:09 1 1 1970
    0:02:10 1 1 1970
    0:02:11 1 1 1970
    0:02:12 1 1 1970
    0:02:13 1 1 1970
    Time is updated
    22:26:01 15 11 2015
    22:26:02 15 11 2015
    22:26:03 15 11 2015
    22:26:04 15 11 2015
    22:26:05 15 11 2015
    ...
    22:26:58 15 11 2015
    22:26:59 15 11 2015
    22:27:00 15 11 2015
    Time is updated
    22:27:01 15 11 2015
    22:27:02 15 11 2015
    22:27:03 15 11 2015
    ...
    

    How can i achieve this with the espruino?

    PS: i also used a 10k resistor to pull up the Data Pin.

About

Avatar for werty1st @werty1st started