I have this error !!

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Kamran\Desktop\SmartIrrigation\SmartIrrigation.ino:5:0:

C:\Program Files (x86)\Arduino\libraries\RTClib/RTClib.h:79:31: error: redeclaration of 'OFF'

enum Ds1307SqwPinMode { OFF = 0x00, ON = 0x80, SquareWave1HZ = 0x10, SquareWave4kHz = 0x11, SquareWave8kHz = 0x12, SquareWave32kHz = 0x13 };

^

In file included from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3MobileNetworkProvider.h:37:0,

from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3MobileClientService.h:37,

from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM.h:42,

from C:\Users\Kamran\Desktop\SmartIrrigation\SmartIrrigation.ino:1:

C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3MobileAccessProvider.h:37:100: note: previous declaration 'GSM3_NetworkStatus_t OFF'

enum GSM3_NetworkStatus_t { ERROR, IDLE, CONNECTING, GSM_READY, GPRS_READY, TRANSPARENT_CONNECTED, OFF};

^

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

OFF cannot have the value zero and five.
Pick some other name, or define a namespace.

AWOL:
OFF cannot have the value zero and five.

Default value for enum types is 0 so it's probably more six than five (just to ensure hzajkani can relate to your comment and his code) - but indeed that's the problem and the solution :slight_smile:

Pick some other name, or define a namespace.

The problem is that OP doesn't actually own either piece of code.

tanks to all , I changed value OFF to OFFF and the problem fixed .