This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Uno"
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/Arduino.h:235,
from sketch_oct19a.ino:18:
C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard/pins_arduino.h:40: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard/pins_arduino.h:41: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard/pins_arduino.h:42: error: expected unqualified-id before numeric constant
C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard/pins_arduino.h:43: error: expected unqualified-id before numeric constant
John, I’ve using 1.0.6 version and I’ve reinstalled it and still giving me issues. I’ve open up pins_arduino.h file with Visual Studio 2013 and look at where the error is being called at and there no #define in front of the error being called out. The code is still work in progress as I’m reworking it to use the SoftwareServo library.
// Libraries
#include <SoftwareServo.h>
#include <ArduinoPins.h>
#include <FatReader.h>
#include <FatStructs.h>
#include <mcpDac.h>
#include <SdInfo.h>
#include <SdReader.h>
#include <WaveHC.h>
#include <Wavemainpage.h>
#include <WavePinDefs.h>
#include <WaveUtil.h>
// Defining Servos and Other Items
SoftwareServo HOIST;
SoftwareServo CRANE;
SoftwareServo LEFT;
SoftwareServo RIGHT;
int joyLR1 = A0; // analog pin used to connect the Joystick 1
int joyUD1 = A1; // analog pin used to connect the Joystick 1
int joyLR2 = A2; // analog pin used to connect the Joystick 2
int joyUD2 = A3; // analog pin used to connect the Joystick 2
int val0; // variable to read the value from the analog pin
int val1; // variable to read the value from the analog pin
int val2; // variable to read the value from the analog pin
int val3; // variable to read the value from the analog pin
void setup()
{
// Starts the user display to display statements
Serial.begin(9600);
// Welcome statement of program
Serial.println ("Hello World,");
delay (1000);
Serial.println ("Welcome");
delay (1000);
Serial.println ("System is Booting Up!");
delay (1000);
// Program hookup of servos
Serial.println ("Attaching Servos NOW!");
delay (1000);
HOIST.attach (7);
Serial.println ("Servo 1 Attached!");
delay (1000);
CRANE.attach (6);
Serial.println ("Servo 2 Attached!");
delay (1000);
LEFT.attach (8);
Serial.println ("Servo 3 Attached!");
delay (1000);
RIGHT.attach (9);
Serial.println ("Servo 4 Attached!");
delay (1000);
// Centering Servos
val0 = analogRead(A0); // reads the value of the potentiometer (value between 0 and 1023)
val0 = map(val0, 0, 1023, 0, 359); // scale it to use it with the servo (value between 0 and 360)
myservo.write(val0); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
SoftwareServo::refresh();
val1 = analogRead(A1); // reads the value of the potentiometer (value between 0 and 1023)
val1 = map(val1, 0, 1023, 0, 359); // scale it to use it with the servo (value between 0 and 360)
myservo.write(val1); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
SoftwareServo::refresh();
val2 = analogRead(A2); // reads the value of the potentiometer (value between 0 and 1023)
val2 = map(val2, 0, 1023, 0, 359); // scale it to use it with the servo (value between 0 and 360)
myservo.write(val2); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
SoftwareServo::refresh();
val3 = analogRead(A3); // reads the value of the potentiometer (value between 0 and 1023)
val3 = map(val3, 0, 1023, 0, 359); // scale it to use it with the servo (value between 0 and 360)
myservo.write(val3); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
SoftwareServo::refresh();
Serial.println ("Centering Servos NOW!");
delay (1000);
HOIST.write (1500);
Serial.println ("Servo 1 Centered!");
delay (1000);
CRANE.write (1500);
Serial.println ("Servo 2 Centered!");
delay (1000);
LEFT.write (1500);
Serial.println ("Servo 3 Centered!");
delay (1000);
RIGHT.write (1500);
Serial.println ("Servo 4 Centered!");
delay (1000);
Serial.println ("Attaching Inputs NOW!");
delay (1000);
pinMode (A0, INPUT); // Joy1 L/R Base Turns
Serial.println ("Input 1 Attached!");
delay (1000);
pinMode (A1, INPUT); // Joy1 U/D Base Moves
Serial.println ("Input 2 Attached!");
delay (1000);
pinMode (A2, INPUT); // Joy2 L/R Crane Turns
Serial.println ("Input 3 Attached!");
delay (1000);
pinMode (A3, INPUT); // Joy2 U/D Crane Hoist/Lower
Serial.println ("Input 4 Attached!");
delay (1000);
pinMode (0, INPUT); // Back Button to play previous track
Serial.println ("Back Button Attached!");
delay (1000);
pinMode (1, INPUT); // Play or Pause Music
Serial.println ("Play Button Attached!");
delay (1000);
pinMode (2, INPUT); // Forward Button to play next track
Serial.println ("Forward Button Attached!");
delay (1000);
pinMode (5, OUTPUT); // Speaker to play music
Serial.println ("Speaker Attached!");
delay (1000);
Serial.println ("System is now Running!");
}
void loop()
{
Serial.print ("\nSTART OF LOOP\n");
// Varibles for the Loop Function
double L_R_base = analogRead(A2);
double U_D_base = analogRead(A3);
double L_R_crane = analogRead(A0);
double U_D_hoist = analogRead(A1);
// Displays Analog pins values
Serial.print ("\nStarting Scan Joystick Values");
Serial.print ("\nL_R_base: "); Serial.print (L_R_base);
Serial.print ("\nU_D_base: "); Serial.print (U_D_base);
Serial.print ("\nL_R_crane: "); Serial.print (L_R_crane);
Serial.print ("\nU_D_hoist: "); Serial.print (U_D_hoist);
// Starts the loop over again comment out "return;" to run the rest of the loop
//return;
// Crane is turning right
while (L_R_base <= 255.0)
{
Serial.print ("\n\nL_R_base:"); Serial.print (L_R_base);
Serial.print ("\nCrane is turning right NOW!");
LEFT.write (1600);
delay (200);
RIGHT.write (1600);
delay (200);
L_R_base = 511.0;
}
// Crane is turning left
while (L_R_base >= 767.0)
{
Serial.print ("\n\nL_R_base:"); Serial.print (L_R_base);
Serial.print ("\nCrane is turning left NOW!");
LEFT.write (1400);
delay (200);
RIGHT.write (1400);
delay (200);
L_R_base = 511.0;
}
// Crane is moving forward
while (U_D_base <= 5.0)
{
Serial.print ("\n\nU_D_base:"); Serial.print (U_D_base);
Serial.print ("\nCrane is moving forwards NOW!");
LEFT.write (1600);
delay (200);
RIGHT.write (1400);
delay (200);
U_D_base = 15.0;
}
// Crane is moving backwards
while (U_D_base >= 30.0)
{
Serial.print ("\n\nU_D_base:"); Serial.print (U_D_base);
Serial.print ("\nCrane is moving backwards NOW!");
LEFT.write (1400);
delay (200);
RIGHT.write (1600);
delay (200);
U_D_base = 15.0;
}
// Crane is rotating left
while (L_R_crane <= 255.0)
{
Serial.print ("\n\nL_R_crane:"); Serial.print (L_R_crane);
Serial.print ("\nCrane is rotating left NOW!");
CRANE.write (1550);
delay (200);
L_R_crane = 511.0;
}
// Crane is rotating right
while (L_R_crane >= 767.0)
{
Serial.print ("\n\nL_R_crane:"); Serial.print (L_R_crane);
Serial.print ("\nCrane is rotating right NOW!");
CRANE.write (1450);
delay (200);
L_R_crane = 511.0;
}
// Crane is hoisting the hook
while (U_D_hoist >= 767.0)
{
Serial.print ("\n\nU_D_hoist:"); Serial.print (U_D_hoist);
Serial.print ("\nCrane is hoisting the hook NOW!");
HOIST.write (2000);
delay (200);
U_D_hoist = 511.0;
}
// Crane is lowering the hook
while (U_D_hoist <= 255.0)
{
Serial.print ("\n\nU_D_hoist:"); Serial.print (U_D_hoist);
Serial.print ("\nCrane is lowering the hook NOW!");
HOIST.write (1000);
delay (200);
U_D_hoist = 511.0;
}
HOIST.write (1500);
delay (1);
CRANE.write (1500);
delay (1);
RIGHT.write (1500);
delay (1);
LEFT.write (1500);
delay (1);
Serial.print ("\n\nEND OF LOOP\n");
}
You are not using all these: #include <SoftwareServo.h> #include <ArduinoPins.h> #include <FatReader.h> <<< #include <FatStructs.h> <<< #include <mcpDac.h> <<< #include <SdInfo.h> <<< #include <SdReader.h> <<< #include <WaveHC.h> <<< #include <Wavemainpage.h> <<< #include <WavePinDefs.h> <<< #include <WaveUtil.h> <<<
Why not take them out until you do - then when you add them back in one by one as you expand your code, you can see where the conflict is coming from. The SD, DAC, and the Wave stuff are likely all using SPI. You’ll likely need to deconflict the usage of pins 4 and 10 for CS between the 3 of them.