Forum

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Problem compiling
mskogly
Beginner
Posts: 26
Permalink
Post Problem compiling
on: August 10, 2016, 21:11
Quote

Downloaded the newest version of the server today, but I'm getting quite alot of errors when trying to verify.

I'm using an arduino mega 2650,
Stepper motors: 28BYJ48
stepper drivers: ULN2003, from eBay
No sd card module.

Errors
polargraph_server_a1.ino:364:6: error: aggregate ‘File root’ has incomplete type and cannot be defined
polargraph_server_a1.ino:370:6: error: aggregate ‘File pbmFile’ has incomplete type and cannot be defined
configuration.ino:87:1: error: ‘IN1’ does not name a type
configuration.ino:105:1: error: ‘motorStepsPerRev’ does not name a type
configuration.ino:107:1: error: ‘motorStepsPerRev’ does not name a type
configuration.ino:108:1: error: ‘mmPerRev’ does not name a type
configuration.ino:109:1: error: ‘DEFAULT_STEPS_PER_REV’ does not name a type
configuration.ino:110:1: error: ‘DEFAULT_MM_PER_REV’ does not name a type
impl_uno.ino: In function ‘void impl_exec_changeToStoreCommandMode()’:
impl_uno.ino:226:11: error: ‘SD’ was not declared in this scope
sd.ino: In function ‘void sd_simpleInit()’:
sd.ino:37:15: error: ‘SD’ was not declared in this scope
sd.ino:48:25: error: ‘FILE_READ’ was not declared in this scope
sd.ino: In function ‘void sd_alternativeInit()’:
sd.ino:58:3: error: ‘Sd2Card’ was not declared in this scope
sd.ino:58:11: error: expected ‘;’ before ‘card’
sd.ino:59:3: error: ‘SdVolume’ was not declared in this scope
sd.ino:59:12: error: expected ‘;’ before ‘volume’
sd.ino:60:3: error: ‘SdFile’ was not declared in this scope
sd.ino:60:10: error: expected ‘;’ before ‘sdFile’
sd.ino:61:8: error: ‘card’ was not declared in this scope
sd.ino:61:18: error: ‘SPI_HALF_SPEED’ was not declared in this scope
sd.ino:76:10: error: ‘card’ was not declared in this scope
sd.ino:77:10: error: ‘SD_CARD_TYPE_SD1’ was not declared in this scope
sd.ino:80:10: error: ‘SD_CARD_TYPE_SD2’ was not declared in this scope
sd.ino:83:10: error: ‘SD_CARD_TYPE_SDHC’ was not declared in this scope
sd.ino:91:8: error: ‘volume’ was not declared in this scope
sd.ino:91:20: error: ‘card’ was not declared in this scope
sd.ino:100:18: error: ‘volume’ was not declared in this scope
sd.ino:117:3: error: ‘sdFile’ was not declared in this scope
sd.ino:120:13: error: ‘LS_R’ was not declared in this scope
sd.ino:120:20: error: ‘LS_DATE’ was not declared in this scope
sd.ino:120:30: error: ‘LS_SIZE’ was not declared in this scope
sd.ino: In function ‘void sd_printDirectory(File, int)’:
sd.ino:130:6: error: ‘dir’ has incomplete type
polargraph_server_a1.ino:203:31: error: forward declaration of ‘struct File’
sd.ino: In function ‘void sd_printDirectory(File, int)’:
sd.ino:132:11: error: variable ‘File entry’ has initializer but incomplete type
sd.ino: In function ‘void sd_storeCommand(String)’:
sd.ino:160:8: error: variable ‘File storeFile’ has initializer but incomplete type
sd.ino:160:20: error: ‘SD’ was not declared in this scope
sd.ino:160:38: error: ‘FILE_WRITE’ was not declared in this scope
sd.ino: In function ‘boolean sd_openPbm(String)’:
sd.ino:191:13: error: ‘SD’ was not declared in this scope
sd.ino:191:31: error: ‘FILE_READ’ was not declared in this scope

mskogly
Beginner
Posts: 26
Permalink
Post Re: Problem compiling
on: August 10, 2016, 21:20
Quote

Commented out some things, now it looks better, but I have one left:
configuration.ino:87:1: error: ‘IN1’ does not name a type

The code on those lines are as follow:

// MotorA
//LN2003 Arduino AcceStepper Init
IN1 22 2
IN2 24 4
IN3 26 3
IN4 28 5
// MotorB
//ULN2003 Arduino AcceStepper Init
IN1 30 6
IN2 32 8
IN3 34 7
IN4 36 9

Are the pinmapping defined somewhere else or is that an omission in the code?

mskogly
Beginner
Posts: 26
Permalink
Post Re: Problem compiling
on: August 10, 2016, 21:31
Quote

I've tried modifying the code like this

#define motorPin1 22 // Blue - 28BYJ48 pin 1
#define motorPin2 24 // Pink - 28BYJ48 pin 2
#define motorPin3 26 // Yellow - 28BYJ48 pin 3
#define motorPin4 28 // Orange - 28BYJ48 pin 4
// Red - 28BYJ48 pin 5 (VCC)

#define motorPin5 30 // Blue - 28BYJ48 pin 1
#define motorPin6 32 // Pink - 28BYJ48 pin 2
#define motorPin7 34 // Yellow - 28BYJ48 pin 3
#define motorPin8 36 // Orange - 28BYJ48 pin 4
// Red - 28BYJ48 pin 5 (VCC)

//for a 28YBJ-48 Stepper, change these parameters above
//Step angle (8-step) 5.625deg, 64 steps per rev
//Step angle (4-step) 11.25deg, 32 steps per rev
//gear reduction ratio 1/63.68395

//motorStepsPerRev = 32 * 63.68395 = 2038; //for 4 step sequence
//motorStepsPerRev = 64 * 63.68395 = 4076; //for 8 step sequence

//motorStepsPerRev = 4076;
//mmPerRev = 63;
//DEFAULT_STEPS_PER_REV = 4076;
//DEFAULT_MM_PER_REV = 63;

/*AccelStepper motorA(8, 6,8,7,9);
AccelStepper motorB(8, 2,4,3,5);
*/
// NOTE: The sequence 1-3-2-4 is required for proper sequencing of 28BYJ48
AccelStepper motorA(8, motorPin5, motorPin7, motorPin6, motorPin8);
AccelStepper motorB(8, motorPin1, motorPin3, motorPin2, motorPin4);

No errors from that part, but now I'm getting this error, even though I have commented out the penlift function (my servo died on me).

polargraph_server_a1.cpp.o: In function `loop':
/usr/share/arduino/polargraph_server_a1.ino:308: undefined reference to `penlift_penUp()'
/usr/share/arduino/polargraph_server_a1.ino:308: undefined reference to `penlift_penUp()'
/usr/share/arduino/polargraph_server_a1.ino:308: undefined reference to `penlift_penDown()'
/usr/share/arduino/polargraph_server_a1.ino:308: undefined reference to `penlift_penUp()'
/usr/share/arduino/polargraph_server_a1.ino:308: undefined reference to `penlift_penDown()'
/usr/share/arduino/polargraph_server_a1.ino:308: undefined reference to `penlift_penUp()'
collect2: error: ld returned 1 exit status

mskogly
Beginner
Posts: 26
Permalink
Post Re: Problem compiling
on: August 15, 2016, 10:12
Quote

Still getting lots of warnings, but I finally have the controller talking to the arduino.

But I'm getting this error when trying clicking the UPLOAD MACHINE SPEC button under SETUP.

Current command C32m 400,1,END
Error in red:
E11:06_26 C25,PGXXABCD,END not recocnised.

I seem to be getting that same error on all commands actually. I tried both on the latest release and the newest master of the arduino codem running windows, arduino 1.6.10.

sandy
Administrator
Posts: 1317
Permalink
sandy
Post Re: Problem compiling
on: August 16, 2016, 19:59
Quote

C25 is an unused command - nothing to worry about. It gets sent as part of the "upload machine spec" command.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.016 seconds.