Cant get RGB clock working

I am quite a novice with arduino and was looking for some help!! I am trying to use the sketch from this project : I have installed the two librarys I need Fastled and the RTClib. But everytime I try and verify the sketch it says "redefinition of 'struct CRGB' and a bunch of other errors.

If anyone could help me out that would be great!!


I assume the 'CRGB' is part of the FastLED. Perhaps it is an older version.

Which Arduino board are you using ?
Which version of the Arduino IDE ? (that is the software that you have downloaded).
Which FastLED version ? You can copy a link to it in your post.
Which RTClib ?

It compiles with the new FastLED library if you change the first part of the sketch to:

// Code collected and completed by Tobias Floery <>

// FastLED Library from
#include <FastLED.h>

// Adafruits RTClib from
#include <Wire.h>
#include "RTClib.h"


// Number of RGB Pixel for FastLED
const int NUM_LEDS = 60;
struct CRGB leds[NUM_LEDS];

// Datapin for FastSPI
const int PIN = 4;

const int FILTER_LEN = 8;

// Brightness level
int level=15;

// Brightness correction for Leds
unsigned char bright[] = {0, 2, 4, 7, 11, 18, 30, 40, 50, 65, 80,96,125,160, 200, 255};

void setup() {
  // Setup FastSPI Lib
  FastLED.addLeds<TM1804, PIN>(leds, NUM_LEDS);

  // init RTClib  
  // setup measurement for LDR
  digitalWrite(A0, HIGH);  // set pullup on analog pin 0 
  pinMode(A1, OUTPUT);
  digitalWrite(A1, LOW);    


Im using a sainsmart arduino with the latest 1.0.5 arduino software, I think it was an older version thats why it wouldn't compile, the code that John posted worked for me so it must have been the code using an old version of FastLED.

Thanks so much, now I just need to figure out how to attach the RTC ds1307 to the arduino!!


Looks like the DS1307 is an I2C/TWI/Wire device. On the Arduino UNO those pins are A4 (SDA) and A5 (SCL):

I have connected the RTC module to A4 and A5 and then ground and 5v but it dosnt seem to be working it changes how the leds light up, when i remove the RTC Module the leds were on 5v but I moved them to 3.3 and even tried using a 5v plug but its not running how i expected I get 4 leds lighting up one red, one blue and two green and they do not change in relation to time, I expected the red led to move round counting seconds, attached is a picture of my current setup.