Compile Error

Hope I'm posting in the correct area.

I have limited experience writing code and I've only written pretty basic stuff for Arduino. I've downloaded SimpleRTC I'm trying to compile it. I am getting a message Multiple libraries found for "RTCZero.h"

I can only find one in the Documents library. What am I doing wrong?

Thanks in anticipation.

Pete

That error message usually tells where it found them and which one it chose to use.

Post the whole message.

Thanks for your swift response.

I can see now the error message has more in it that I could see.

The first bit of the error message I now see makes me suspect that my Arduino may not be compatible.

Do I get another Arduino or can the code be modified?

Peter

WARNING: library RTCZero claims to run on samd architecture(s) and may be incompatible with your current board which runs on avr architecture(s). In file included from C:\Users\Pete\Documents\Arduino\SimpleRTC\SimpleRTC.ino:18:0:

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:32:26: error: 'RTC_MODE2_MASK_SEL_OFF_Val' was not declared in this scope

MATCH_OFF = RTC_MODE2_MASK_SEL_OFF_Val, // Never

^~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:33:26: error: 'RTC_MODE2_MASK_SEL_SS_Val' was not declared in this scope

MATCH_SS = RTC_MODE2_MASK_SEL_SS_Val, // Every Minute

^~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:34:26: error: 'RTC_MODE2_MASK_SEL_MMSS_Val' was not declared in this scope

MATCH_MMSS = RTC_MODE2_MASK_SEL_MMSS_Val, // Every Hour

^~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:35:26: error: 'RTC_MODE2_MASK_SEL_HHMMSS_Val' was not declared in this scope

MATCH_HHMMSS = RTC_MODE2_MASK_SEL_HHMMSS_Val, // Every Day

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:36:26: error: 'RTC_MODE2_MASK_SEL_DDHHMMSS_Val' was not declared in this scope

MATCH_DHHMMSS = RTC_MODE2_MASK_SEL_DDHHMMSS_Val, // Every Month

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:37:26: error: 'RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val' was not declared in this scope

MATCH_MMDDHHMMSS = RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val, // Every Year

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Pete\Documents\Arduino\libraries\RTCZero\src/RTCZero.h:38:26: error: 'RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val' was not declared in this scope

MATCH_YYMMDDHHMMSS = RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val // Once, on a specific date and a specific time

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Multiple libraries were found for "RTCZero.h" Used: C:\Users\Pete\Documents\Arduino\libraries\RTCZero exit status 1 Error compiling for board Arduino/Genuino Uno.

Hi, I had a smiliar error once. I got it fixed by deleting the library and reinstalling it via the library manager of the arduino ide. Mybe this fixes your problem too

So this first part of the message is SUPER important. Read this:

WARNING: library RTCZero claims to run on samd architecture(s) and may be incompatible with your current board which runs on avr architecture(s).

It says you don’t have the right type of arduino to use this library. Or you have the wrong board selected in the IDE. Either way, fix that first.

Delta_G:
So this first part of the message is SUPER important. Read this:

It says you don’t have the right type of arduino to use this library. Or you have the wrong board selected in the IDE. Either way, fix that first.

I’ve used this sketch to check what I have and none of them compile. Probably a clone?

I think it may be quicker and better if I get a board with the samd architecture. How can I be sure I get the right one.

Thanks
Pete

Code: [Select]
#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560)

//Code in here will only be compiled if an Arduino Mega is used.

#endif

Similarly, you can do this

Code: [Select]
#if defined(AVR_ATmega328P) || defined(AVR_ATmega168)

//Code in here will only be compiled if an Arduino Uno (or older) is used.

#endif

And this:

Code: [Select]
#if defined(AVR_ATmega32U4) || defined(AVR_ATmega16U4)

//Code in here will only be compiled if an Arduino Leonardo is used.

#endif

The sketch and library were written specifically for the boards with a samd processor that has an internal RTC, you need the correct board to run it. Try compiling for an Arduino Zero, MKRZero, or MKR1000.

david_2018:
The sketch and library were written specifically for the boards with a samd processor that has an internal RTC, you need the correct board to run it. Try compiling for an Arduino Zero, MKRZero, or MKR1000.

OK, I don’t see any Arduino Zeros but there are MKRZero’s & MKR1000’s. I’ve also seen Arduino DUE but I don’t know which chip it uses, so what I’ll go with your suggestions.

Thanks again to all who have helped me along.

Pete