Jump to content

[Energia Library] RTClib (external: DS1388, PCF8563 etc.)

Recommended Posts

Another trivial port... this is the RTCLib I've been using for a couple of AVR projects, it runs with really minor modifications (just stripped out PROGMEM related stuff).


I've already pulled a request to the main repo (I've been contributing DS1388 to this lib in the past).


While the pull gets in, here is the library on my fork:




I've tested the library on my LP 1.5 with a DS1388 (3.3V version) and it's working fine.



#include <Wire.h>
#include <RTClib.h>
DateTime now;

// Ugly globals...
uint8_t timeH;
uint8_t timeM;
volatile uint8_t timeS;
uint8_t dateD;
uint8_t dateM;
uint16_t dateY;
uint8_t dateW;

void setup() {
    if (!RTC.isrunning()) {
        // following line sets the RTC to the date & time this sketch was compiled
        RTC.adjust(DateTime(__DATE__, __TIME__));


void loop() {
    // Read clock
    now = RTC.now();
    timeH = now.hour();
    timeM = now.minute();
    timeS = now.second();
    dateD = now.day();
    dateM = now.month();
    dateY = now.year();
    // Do something with those figures...

Link to post
Share on other sites
  • 6 months later...
  • 5 months later...

I've tested the library on my LP 1.5 with a pcf8563  and can not compile ok.Thanks! :mellow:


rty change in sketch

#include <RTClib.h>


#include "RTClib.h"


and check files

<PATH TO ENERGIA>\hardware\msp430\libraries\RTClib\rtclib.cpp

<PATH TO ENERGIA>\hardware\msp430\libraries\RTClib\rtclib.h

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...