Hello,
i'm newb with Processing but want to build a small tool to work with a servo.
To have precise control of servo, we can adjust pulseMin and PulseMax when attach a servo to an arduino...
by default it use 440 and 2400...
I would like to configure each servo with the good pulseMin and Max...
In the firmata protocole there is some line to use pulseMin and pulseMax but no exemple to apply it..
is there anybody who have experience with
Servos
This is the current proposal for adding Servo support based on feedback from Bjoern Hartmann, Shigeru Kobayashi, and Erik Sjodin. The core idea is to just add a "config" message, then use the
SET_PIN_MODE
message to attach/detach Servo support to a pin. This is how hardware PWM is currently handled. This would save space in the protocol by reusing theSET_PIN_MODE
message, but the host software implementation could have a different interface, e.g. Arduino'sattach()
anddetach()
.minPulse, maxPulse, and angle are all 14-bit unsigned integers. Angle is in degrees. The
SERVO_CONFIG
can be sent at any time to change the settings./* servo config * -------------------- * 0 START_SYSEX (0xF0) * 1 SERVO_CONFIG (0x70) * 2 pin number (0-127) * 3 minPulse LSB (0-6) * 4 minPulse MSB (7-13) * 5 maxPulse LSB (0-6) * 6 maxPulse MSB (7-13) * 7 angle LSB (0-6) * 8 angle MSB (7-13) * 9 END_SYSEX (0xF7) */This is just the standard
SET_PIN_MODE
message:/* set digital pin mode * -------------------- * 1 set digital pin mode (0xF4) (MIDI Undefined) * 2 pin number (0-127) * 3 state (INPUT/OUTPUT/ANALOG/PWM/SERVO, 0/1/2/3/4) */Then the normal
ANALOG_MESSAGE
data format is used to send data./* write to servo, servo write is performed if the pins mode is SERVO * ------------------------------ * 0 ANALOG_MESSAGE (0xE0-0xEF) * 1 value lsb * 2 value msb*/
i'm confused.
best regards
and happy new year!
2