Hi
Hitec digital servo with potentiometer - Arduino Duemilanove - Max 5.1.3
the configuration:
servo (potentiometer) > arduino (digital pin9 PWM) > Max [serial] external
what works:
controlling the servo with Max
what doesn't work:
getting servo position from the servo potentiometer in Max
I am getting really frustrated because i don't get this simpel input working.
Searched the forum and internet and done a lot of tests in Arduino and Max.
what doesn't work:
getting servo position from the servo potentiometer in Max
With what code?
The function to "read" a servo position will only return the last position the servo was commanded to go to, not it's actual position (in case they are not the same).
Doesn't max have the ability to remember anything?
The potentiometer tells the servo when it is in the correct position. It is not available to be read. It simply isn't wired that way.
If the servo can get to the commanded position, it will. The position read will be where the servo is, and will be the same as the commanded position.
If the servo can not get there, because the value is out of range, the torque required is too high, the current available is too low, or for any other reason, the position read will not be where the servo actually is. Rather, it will be where the servo was last to go.
So, reading the servo doesn't provide any new/accurate information.
As a result, it is unlikely that the ServoFirmata code even includes such a capability.
You mean that i will have to make Max program to remember the position that i have send?