stdlib.h:111: error: expected `)' before 'int'

Constant error when I try to use any older servo libraries.

The "Servo" that comes with Arduino 0017 is missing the "refresh" keyword also, is there any easy way to add that bit since it seems like that's the part I'm missing from the new Ver.?

../avr/include/stdlib.h:111: error: expected `)' before 'int'

All previously working servo samples return the same error.

(And yeah I can work around it, but I'd rather not take an hour to work around a problem every damn upgrade, I want one copy that works! :)

(XP, new arduino install w. no old ones)

Older Servo library from here:

http://www.arduino.cc/playground/uploads/ComponentLib/servo.zip

Latest version of Arduino from: main site

I also have had issues with the servo library on arduino 0017 so I use the megaservo library that seems to work just fine. Apparently the inbuilt servo library is meant to be the megaservo library but obviously an older version or something...

Mowcius

Constant error when I try to use any older servo libraries. The "Servo" that comes with Arduino 0017 is missing "refresh"

None of the official servo libraries that were distributed with Arduino have needed or used refresh. If you are using an offical servo library you can remove the calls to refresh in your sketch.

I also have had issues with the servo library on arduino 0017 so I use the megaservo library that seems to work just fine. Apparently the inbuilt servo library is meant to be the megaservo library but obviously an older version or something...

what issues did you have with the 0017 servo library?

The supplied servo library in 0017 is derived from the megaservo code so I am surprised that you have seen any difference (other than the library name).

It told me that lots of things weren't defined... Can't remember exactly...

If you just open up the example and try to complie it then you will see what I mean!

Here we go:

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp: In static member function 'static void Servo::seizeTimer1()':

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:54: error: 'TIMSK' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:54: error: 'TICIE1' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp: In member function 'uint8_t Servo::attach(int, int, int)':

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:73: error: 'SERVO_PIN_A' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:73: error: 'SERVO_PIN_B' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:85: error: 'SERVO_PIN_A' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:90: error: 'SERVO_PIN_B' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp: In member function 'void Servo::detach()':

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:100: error: 'SERVO_PIN_A' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:106: error: 'SERVO_PIN_B' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp: In member function 'void Servo::write(int)':

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:127: error: 'SERVO_PIN_A' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:128: error: 'SERVO_PIN_B' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp: In member function 'uint8_t Servo::attached()':

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:138: error: 'SERVO_PIN_A' was not declared in this scope

C:\Program Files\arduino-0017\hardware\libraries\Servo\Servo.cpp:139: error: 'SERVO_PIN_B' was not declared in this scope

Mowcius

mowcius, the lines in those error messages do not look like they come from code in the 0017 servo library. Check the first line in servo.cpp and if you don't see the following then you are not using the distributed code.

/*
  Servo.cpp - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2

You may want to try reinstalling the distributed 0017 servo code and see if the error messages go away.

That's a good point, I transferred all of my old libraries to arduino 17 when I re-installed so I probably replaced it with an old library by accident. I do not have that code line in servo.cpp

I will now re-install the servo library,

Thanks,

Mowcius