I have a function to control the move of a couple of servos. This function - almost the same - has been written for Arduino and in Java using Firmata. The problem is that when the function runs inside a sketch the servo makes all the available path (between 0 and 120 Deg) while when the same calls (a servo write to the connected pin) passing through Firmata the servo accept all the values in sequence but follow only the path. The effect is that from Firmata the movement seems that 160 steps only moves the servo for 90 Deg.
The strange that happens is that this occur only with one of the two servos while calling the function (I mean the same code) with the second servo the problems does not occur. Obviously when I upload the sketch again on the Arduino board both servos works as expected.
I am suing the digital write value in Deg to the servo pin and I have not tried to use the write millis alternative - as it is more precise and the movement can be controlled better - because I have not found a similar method to manage the servos from Firmata library.
The two servos are exactly the same and for your information I attach the datasheet. The servo is powered by a regulated external source +5V to avoid any interference with the Arduino power line and give the sufficient power to the engine.
Thanks in advance to all that has a suggestion.
Message was edited by: Enrico Miglino