Word Clock Debug

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
violaEmperor
 
Posts: 6
Joined: Wed Aug 18, 2021 4:44 pm

Word Clock Debug

Post by violaEmperor »

Hello,
I've been in the process of making a word clock with an Arduino Nano Every instead of the pro trinket due to deprecation, but when is try to compile the code I get the following error:
WordClock_NeoMatrix8x8:104:12: error: expected ')' before '*' token
RTC_DS1307 RTC; // Establish clock object
^
WordClock_NeoMatrix8x8:104:12: error: expected ')' before '*' token
/Users/user/Downloads/WordClock-NeoMatrix8x8-master-2/WordClock_NeoMatrix8x8/WordClock_NeoMatrix8x8.ino: In function 'void setup()':
WordClock_NeoMatrix8x8:157:7: error: 'RTC_t {aka struct RTC_struct}' has no member named 'begin'
RTC.begin(); // begin clock
^~~~~
WordClock_NeoMatrix8x8:159:13: error: 'RTC_t {aka struct RTC_struct}' has no member named 'isrunning'
if (! RTC.isrunning()) {
^~~~~~~~~
WordClock_NeoMatrix8x8:162:9: error: 'RTC_t {aka struct RTC_struct}' has no member named 'adjust'
RTC.adjust(DateTime(__DATE__, __TIME__));
^~~~~~
WordClock_NeoMatrix8x8:165:33: error: 'RTC_t {aka struct RTC_struct}' has no member named 'now'
DateTime standardTime = RTC.now();
^~~
WordClock_NeoMatrix8x8:169:9: error: 'RTC_t {aka struct RTC_struct}' has no member named 'adjust'
RTC.adjust(standardTime);
^~~~~~
/Users/user/Downloads/WordClock-NeoMatrix8x8-master-2/WordClock_NeoMatrix8x8/WordClock_NeoMatrix8x8.ino: In function 'void loop()':
WordClock_NeoMatrix8x8:190:39: error: 'RTC_t {aka struct RTC_struct}' has no member named 'now'
theTime = dst_rtc.calculateTime(RTC.now()); // takes into account DST
^~~
exit status 1
expected ')' before '*' token

What should I do?
Thanks

User avatar
adafruit_support_carter
 
Posts: 29167
Joined: Tue Nov 29, 2016 2:45 pm

Re: Word Clock Debug

Post by adafruit_support_carter »

You're trying to compile this sketch?
https://github.com/andydoro/WordClock-N ... rix8x8.ino

What specific board are you selecting in the Arduino IDE?

User avatar
violaEmperor
 
Posts: 6
Joined: Wed Aug 18, 2021 4:44 pm

Re: Word Clock Debug

Post by violaEmperor »

Yup. I've selected Arduino Nano Every from Arduino megaAVR boards. I have the registers emulation set to "ATMEGA328". I've uploaded a couple other sketches and those worked fine.

User avatar
adafruit_support_carter
 
Posts: 29167
Joined: Tue Nov 29, 2016 2:45 pm

Re: Word Clock Debug

Post by adafruit_support_carter »

It seems to be related to the use of capital letters for the variable here:

Code: Select all

RTC_DS1307 RTC; // Establish clock object
It's probably conflicting with some pre-processor #def somewhere.

Can recreate the issue with this simple sketch:

Code: Select all

#include "RTClib.h"

RTC_DS1307 RTC;

void setup() {
}

void loop() {
}

Simply changing the name of the variable fixes it:

Code: Select all

#include "RTClib.h"

RTC_DS1307 ds1307;

void setup() {
}

void loop() {
}
Try changing the sketch code to use a different variable name.

User avatar
violaEmperor
 
Posts: 6
Joined: Wed Aug 18, 2021 4:44 pm

Re: Word Clock Debug

Post by violaEmperor »

Thanks! It compiles and uploads correctly now.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”