Hi , this is my first post . Ive been looking all over the forums and found someone asking a similar question but the answer were too technical for me i guess because i cant solve my issue ... I bought an arduino due and the only thing i have done so far is make the led blink to make sure i was connected ... Thanks a lot in advance to those who will try to help me ![]()
So heres my issue :
Im trying to copy and paste a code from a website :
http://garagelab.com/profiles/blogs/project-li-ion-battery-tester-discharger-with-arduino
If i select the wrong board ( Uno ) , everything works fine except i cant upload to the board ...
But when im trying to verify it i get a bunch of error ! :
Arduino: 1.6.5 (Linux), Board: "Arduino Due (Programming Port)"
sketch_jun21l:7: error: 'float time' redeclared as different kind of symbol
In file included from /home/sebastien/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/arm-none-eabi/include/stdlib.h:11:0,
from /home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Arduino.h:24,
from sketch_jun21l.ino:7:
/home/sebastien/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/arm-none-eabi/include/time.h:47:11: error: previous declaration of 'time_t time(time_t*)'
time_t _EXFUN(time, (time_t _timer));
^
sketch_jun21l.ino: In function 'void measure()':
sketch_jun21l:19: error: ISO C++ forbids incrementing a pointer of type 'time_t ()(time_t*) {aka long int ()(long int)}' [-fpermissive]
sketch_jun21l:19: error: lvalue required as increment operand
sketch_jun21l:32: error: call of overloaded 'print(time_t (&)(time_t*))' is ambiguous
sketch_jun21l.ino:32:18: note: candidates are:
In file included from /home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Stream.h:26:0,
from /home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/HardwareSerial.h:24,
from /home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Arduino.h:183,
from sketch_jun21l.ino:7:
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:61:12: note: size_t Print::print(char)
size_t print(char);
^
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:61:12: note: no known conversion for argument 1 from 'time_t(time_t*) {aka long int(long int*)}' to 'char'
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:62:12: note: size_t Print::print(unsigned char, int)
size_t print(unsigned char, int = DEC);
^
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:62:12: note: no known conversion for argument 1 from 'time_t(time_t*) {aka long int(long int*)}' to 'unsigned char'
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:63:12: note: size_t Print::print(int, int)
size_t print(int, int = DEC);
^
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:63:12: note: no known conversion for argument 1 from 'time_t(time_t*) {aka long int(long int*)}' to 'int'
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:64:12: note: size_t Print::print(unsigned int, int)
size_t print(unsigned int, int = DEC);
^
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:64:12: note: no known conversion for argument 1 from 'time_t(time_t*) {aka long int(long int*)}' to 'unsigned int'
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:65:12: note: size_t Print::print(long int, int)
size_t print(long, int = DEC);
^
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:65:12: note: no known conversion for argument 1 from 'time_t(time_t*) {aka long int(long int*)}' to 'long int'
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:66:12: note: size_t Print::print(long unsigned int, int)
size_t print(unsigned long, int = DEC);
^
/home/sebastien/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:66:12: note: no known conversion for argument 1 from 'time_t(time_t*) {aka long int(long int*)}' to 'long unsigned int'
sketch_jun21l.ino: In function 'void TIMER1_OVF_vect()':
sketch_jun21l:41: error: 'TCNT1' was not declared in this scope
sketch_jun21l.ino: In function 'void setup()':
sketch_jun21l:52: error: 'TIMSK1' was not declared in this scope
sketch_jun21l:53: error: 'TCCR1A' was not declared in this scope
sketch_jun21l:54: error: 'TCNT1' was not declared in this scope
sketch_jun21l:55: error: 'TCCR1B' was not declared in this scope
'float time' redeclared as different kind of symbol
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.