hello , i am trying to this project Arduino Playground - DirectDriveLEDMatrix but when i compile the first program it gives an error like this :
c:/users/cristinello/desktop/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected unqualified-id before 'double'
c:/users/cristinello/desktop/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected )' before 'double' c:/users/cristinello/desktop/arduino-0022/hardware/tools/avr/lib/gcc/../../avr/include/math.h:439: error: expected
)' before 'double'
Cand someone explain what does that mean ? I'm new to programming and i do not know how to repair that
Thank you!
There are multiple sketches on that page? which one are you referring to?
i was referring to the first one, sorry.. i've tried compiling the second one also but i get the same thing..
(part of the ) solution is in this thread - http://arduino.cc/forum/index.php/topic,71405.0.html - read carefully.
i read everything about his problem, even that thread but it seems no one knows how to fix this problem.. or have i missed something ?
I don't have such a ledarray of the freq lib installed but it seemed that Nick Gammon posted a new version of the freq lib that should work for the 328 processor but he did not fixedit for the MEGA.
So let me get this straight,the errors occur because of that library which needs to be upgraded in order to support the microcontroller on Arduino Uno?
In brief, the word "round" is defined in two different ways in the libraries. If you comment out one of them, you should be able to work past that point. Read the thread mentioned above for more details. It's nothing to do with "support the microcontroller on Arduino Uno" - it's a coding, er, problem in the library code.
Ok,so i tried commenting the line
Code:
double round (double __x) ATTR_CONST;
in math.h but now i get a lot of other errors.Can you please be a bit more specific because my knowledge of c/c++ is not great.I would appreciate it.
PS: I also tried to do those other substitutions you suggested but nothing works
PS2: I managed to compile that program doing the instructions from this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239820770/4 :
In FrequencyTimer2.h, replace the line
#include <wiring.h>
with
#include <inttypes.h>
And put the line
#include <wiring.h>
into to FrequencyTimer2.cpp (just after the #include <FrequencyTimer2.h>
as suggested above, add the following to start of FrequencyTimer2.cpp :
#if defined(AVR_ATmega328P)
// Timer2 is the same on the mega328 and mega168
#define AVR_ATmega168
#endif
This should compile.
If you want to get rid of the warning, in the getPeriod method replace the line
uint8_t shift;
with
uint8_t shift=0;
but now the matrix just doesn't do anything..