Go Down

Topic: Time and TimeAlarms Libraries – Ask here for help or suggestions (Read 78 times) previous topic - next topic

sumustinis

#105
Jun 02, 2012, 01:08 pm Last Edit: Jun 02, 2012, 05:09 pm by sumustinis Reason: 1
Hi there,
Does anyone has a problem like I`m having with Time library? As soon as I do #include <Time.h> and try to verify in any sketch the Arduino IDE throws out compilation error below

/usr/share/arduino/libraries/Time/DateStrings.cpp:18:18: error: variable 'monthStr1' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

jan_bl

I got the same errors here with arduino 18, 22 and 1.01. and different Time lib versions.

/usr/share/arduino/libraries/Time/DateStrings.cpp:18:18: error: variable 'monthStr1' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

The fix for my debian system was:

go back to gcc-avr version 4.3.5-1 * and
go back to avr-libc version 1.6.8-2 *

Now everything compiles just fine

* i updated to gcc-avr 4.7.0-2 and avr-libc 1.8.0-2 which broke compiling TIME libs.

Having fun again
Jan

Roger at CCCC

Hello, I'm trying to find out why the Examples in the Time library won't compile. 

I recently downloaded Ardiuno 1.0.1, then followed the directions on the Arduino playground - Time libary page at:  http://arduino.cc/playground/Code/Time

First, I downloaded the time.zip file, then extracted the folders within it.  This yielded one folder named "Time" as well as three folders within this top level "Time" folder.  These three folders were named "DS1307RTC", "Time", and "TimeAlarms" . 

Then I copied the "Time" library into the Arduino "libraries" folder, then started Arduino.exe, and selected TimeSerial.pde from the Examples list.  This sketch loaded and I pressed "Verify" and received the error message : "The 'BYTE' keyword is no longer supported.  "  All of the example sketches failed to compile but had different error messages. 

I think I did everything correct, and did it both for the top level "Time" folder and also for the "Time" folder contained within the top level folder.  Neither one worked. 

Unless I'm doing something wrong, there must be something wrong with the folder structure of the library, but, if so, I am surprised this error is not already well known. 

I'm not very experienced with Arduino, so that's why it is confusing. 

Thanks in advance for any information about this problem.   

lion032

Hello everybody!

In my project I needed to set the ds1307rtc from individual input something that the ds1307 included with time lack.

So I want to shear the updated file that include now the function:

 
Code: [Select]
void set(int hour, int min, int sec, int day, int month, int year);

year input can be either in 4 or 2 digit format.

You can download it from my project's sourceforge page:

http://sourceforge.net/projects/computerizedtel/files/DS1307RTCNEW.rar/download

Enjoy

PaulS

Quote
Then I copied the "Time" library into the Arduino "libraries" folder, then started Arduino.exe, and selected TimeSerial.pde from the Examples list.  This sketch loaded and I pressed "Verify" and received the error message : "The 'BYTE' keyword is no longer supported.  "  All of the example sketches failed to compile but had different error messages. 

There are two libraries folders - one in your sketch folder and one in the folder where you installed the Arduino IDE. Which one did you copy the Time library to? The one in the Arduino IDE folder is NOT the proper place for user-downloaded libraries.

The BYTE message indicates that the library that contains it has not been updated for 1.0+.

How to update it has been covered many times, many ways, many places.

Go Up