Problem with Blynk Library and RTC Library

after I got my Wifly Board finally working, I figured our a new problem, BUT I was able to identify the source:

This is my setup void:

void setup()
  for (int i=0; i<5; i++) {
    if (i<4) {
      for (int j=0;j<13;j++) {
        boards[i].setPWM(LEDpins[j], 0, 0);
    else if (i==4) {
      for (int k=0;k<8;k++) {
        boards[i].setPWM(LEDpins[k], 0, 0);
    //uint8_t twbrbackup = TWBR;
    //TWBR = 12;  
  //Serial.begin(9600);       // Set console baud rate
  WiFlySerial.begin(9600);  // Set your RN-XV baud rate
  if (!wifly.begin(&WiFlySerial)) {
    BLYNK_FATAL("Failed to start wifly");
  Blynk.begin(auth, wifly, "tnthome", "testtest");  
  timer.setInterval(2000, blinking);
  //rtc.setTime(21,00, 00); 
  pinMode(4, OUTPUT);


These are the libraries I use:

#include <WiFlyHQ.h>
#include <BlynkSimpleWiFly.h>
char auth[] = "ac5639ce971f46d4a9b990c28cbdf4a2";
#define WiFlySerial Serial1 
boolean autoLED=true;
WiFly wifly;
#include <DS3231.h>
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
#include <DS18B20.h>
#include <SimpleTimer.h> 

So the problem is that my code stucks at rtc.begin(); and doesnt start the void loop.
If I comment that out, everything worx fine.

Now the weird thing:
Onboard of my PCB are:

  • DS3231
  • Atmega 1284
  • Wifly Board
    If i fire this with 5v and Gnd, everything worx fine, even if rtc.begin is not commented out.
    If I connect the board to my LED PCB (with PCA9685 on board), it only worx if I comment it out.

Connection is 5v, gnd, SDA, SCL.
So of course both, PCA9685 nd RTC use I2C.

So you guys you think you can help me out?

That is the RTC library:

Problem solved…just put the rtc.begin call on top of order in setup void.
So…IM HAPPY - and cant wait for android update, especially if you start working on rgb wheel.

1 Like

Great you figured it out!

Our ZERGBA widget is on the way. It won’t be a wheel though :wink: