RTCLib not really working

Hey, im quite new to the arduino etc, and i wanted to make a Arduino Digital Clock with WS2812 LED Stripes. The LED Stripes work fine, but as it needs the time, i used RTCLib.

Shortened Code:

#include <Time.h> 
#include <Wire.h>
#include "FastLED.h"
#include "RTClib.h"



tmElements_t tm;


if i compile this i get this error:

Clock.ino: In function 'void TempToArray()':
Clock:184: error: expected unqualified-id before '(' token
Clock:191: error: 'class RTC_DS3231' has no member named 'temperature'
   int t = RTC.temperature();

and it marks the RTC.(Now); red…

I dont know why this doesnt work, i tried everything i thought would help, and googled it many times, but i didnt fin anything what helped.

TECHNOFAB aka Fabian

I am not sure what you think that RTC.(tm) does, nor do I know what you think that RTC.(Now) does. Do you see any examples that look like this?

Well i have the code from a Youtube video, link: https://www.youtube.com/watch?v=LojGHyBFE8Q

TECHNOFAB aka Fabian

I didn’t see any code with that video. Where have you seen code that uses the (non-existant) commands you show? Wherever you got that code, don’t get code from there anymore because they obviously don’t know what they are doing. Go look at the example codes that came with your RTC library.

I found the source code (clock.ino inside clock.rar) and it has the same lines. Bad code. Do not use this code. It is not to be trusted. Sorry.

So, do you have code which can control a WS2812 Led Stripe? I'm new and doing this myself would cost me very very much time. Doing it myself would be better for learning but I don't have that much time


There's a ton of code all over the Internet to control those. Just do a quick google search and you'll come up with hundreds of examples. I don't see any need to write a new one just special for you. Especially when you haven't given me any clue as to what you would have it do. I understand that you have a time issue, please understand that we all have time issues and your time is no more important than mine.

Google fastled.h library and adafruit's neopixel.h library.

That with the time was silly, sry. Thanks for the help tho :)