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
Word Clock Debug
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Word Clock Debug
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?
https://github.com/andydoro/WordClock-N ... rix8x8.ino
What specific board are you selecting in the Arduino IDE?
- violaEmperor
- Posts: 6
- Joined: Wed Aug 18, 2021 4:44 pm
Re: Word Clock Debug
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.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Word Clock Debug
It seems to be related to the use of capital letters for the variable here:
It's probably conflicting with some pre-processor #def somewhere.
Can recreate the issue with this simple sketch:
Simply changing the name of the variable fixes it:
Try changing the sketch code to use a different variable name.
Code: Select all
RTC_DS1307 RTC; // Establish clock object
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() {
}
- violaEmperor
- Posts: 6
- Joined: Wed Aug 18, 2021 4:44 pm
Re: Word Clock Debug
Thanks! It compiles and uploads correctly now.
Please be positive and constructive with your questions and comments.