3 Replies Latest reply on Jan 6, 2014 6:49 AM by arduino_4_life

    Time.h issues - functions not in scope??

    s.widmer

      After downloading the Time.h files from Ardunio-Playground and installing the library in the IDE, I attempt to utilize any function such as now(); and I receive an error message upon compilation.  I have enter #include <Time.h> above all other code so the functions should be visible  through out the program and all sub-functions and procedures.  This is very noticable in the loop{} function.

        • 1. Re: Time.h issues - functions not in scope??
          arduino_4_life

          What does the error message say? gotta be a little more specific there s.widmer.

           

          Plus, after downloading the Time library and giving a quick look, I can see that the file 'DateStrings.cpp' includes an AVR-specific header file (avr/pgmspace.h), so it's never going to compile unless you port it for Galileo, i.e. remove all calls to anything defined in avr/pgmspace.h.

          Usually, this is pretty easy to do. From the looks of the contents of 'DateStrings.cpp' you shouldn't have any trouble- BUT that's assuming all the other files are clean of AVR header files. And maybe your problem is being caused by something else, anyway. Hard to tell. You need to post the error message.

          1 of 1 people found this helpful
          • 2. Re: Time.h issues - functions not in scope??
            s.widmer

            Is there a document that describe porting libraries to Galileo?

             

            How do I get the Ardunio Galileo IDE to give me the debug information to make this discussion more viable?

             

            Is there a document I have yet to locate that better describes this process in the Intel site or should I further search the  arduino site further...

             

            Thanks for your insight...I'm a little new to this processor and programming method.

            • 3. Re: Time.h issues - functions not in scope??
              arduino_4_life

              "Is there a document that describe porting libraries to Galileo?"

                   Are you familiar with C or C++? if so then read up on avr/pgmspace.h and you'll figure it out.

                   No, there's no 'formula' for porting AVR code for Galileo. Except "Google until you find something of equivalent functionality"

                   In this case, it looks like <avr/pgmspace.h> is used to store the strings of text that represent names of months and days of the week in the Arduino's program memory (non-volatile), to save RAM. All you have to do is change it so that these strings are stored in RAM like all your other  normal variables.

               

              "How do I get the Ardunio Galileo IDE to give me the debug information to make this discussion more viable?"

                   You said in your first comment 'I receive an error message upon compilation'. Whats the error message?

                   besides, this message will probably change (or maybe even go away??!) once you've removed any avr library      dependencies

               

              Erik.