I am using the Arduino IDE with Teensyduino 1.53 installed on Windows 7 machine and have selected as the board "Teensy 3.2/3.1". I declare some global short x1, y1, x2, y2; and assign y1 a value.
I get the following error(s):
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino:1:11: error: 'short int y1' redeclared as different kind of symbol
short x1, y1, x2, y2;
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:36:0,
from C:\Users\don\AppData\Local\Temp\arduino_build_516762\pch\Arduino.h:6:
c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\math.h:539:15: note: previous declaration 'double y1(double)'
extern double y1 _PARAMS((double));
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino: In function 'void setup()':
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino:5:8: error: assignment of function 'double y1(double)'
y1 = 5;
^
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino:5:8: error: cannot convert 'int' to 'double(double)' in assignment
Error compiling for board Teensy 3.2 / 3.1.
The following is the code:
Is this something I can fix or is there something in a library that is not properly scoped?
Thanks, don
I get the following error(s):
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino:1:11: error: 'short int y1' redeclared as different kind of symbol
short x1, y1, x2, y2;
^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:36:0,
from C:\Users\don\AppData\Local\Temp\arduino_build_516762\pch\Arduino.h:6:
c:\program files (x86)\arduino\hardware\tools\arm\arm-none-eabi\include\math.h:539:15: note: previous declaration 'double y1(double)'
extern double y1 _PARAMS((double));
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino: In function 'void setup()':
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino:5:8: error: assignment of function 'double y1(double)'
y1 = 5;
^
C:\Users\don\Documents\Projects\Instructable Projects\Chess_Robot\Test_Programs\IDETest_Teensy3.1\IDETest_Teensy3.1.ino:5:8: error: cannot convert 'int' to 'double(double)' in assignment
Error compiling for board Teensy 3.2 / 3.1.
The following is the code:
Code:
short x1, y1, x2, y2;
void setup()
{
y1 = 5;
}
void loop()
{
while(1);
}
Is this something I can fix or is there something in a library that is not properly scoped?
Thanks, don