Go Down

Topic: Problems with Pduino 0.5b6 and Servo Library (Read 650 times) previous topic - next topic

guido.tamino

Hello everybody,

I've been using Pduino 0.4b2 with StandardFirmata library included in Arduino 0016 for a long time and it always worked fine.

Recently, in order to control servos with PD, I downloaded the latest Pduino update 0.5b6 + Firmata 2.1b7 and I'm trying to make it work with my Arduino Diecimila. As I try to compile the updated StandardFirmata sketch I get this error: 'MAX_SERVOS' was not declared in this scope.

I made a lot of research on the internet, but I couldn't find anything to solve this issue. I don't know, maybe it's something easy, but I really couldn't figure out how to get it working.

Any advice or resource will be greatly appreciated. Thank you!

mem

MAX_SERVOS was not defined in Arduino servo libraries prior to 0017,
are you still using 0016?

Perhaps the latest firmata is being tested mostly with arduino 0017, it may be prudent that you upgrade from 0016 if you are still using it.

If you do want to use 0016, you could try to add the following line  towards the top of your sketch:
 #define MAX_SERVOS             2 // only two servos in 0016 or earlier


guido.tamino

I put the #define statement on the top and compiled the sketch without errors, BUT servos didn't work anyway.

After several attempts of controlling the servo with Pduino (actually the "servo" mode wasn't working at all) I decided to switch to Arduino 0017 + the latest release of Firmata and now everything works fine.

Thank you!

Go Up