Pages: [1]   Go Down
Author Topic: Firmata + servo + pulseMin et pulseMax  (Read 289 times)
0 Members and 1 Guest are viewing this topic.
Britanny
Offline Offline
Full Member
***
Karma: 0
Posts: 233
Mais vrai, j'ai trop pleuré, toute lune est atroce
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Salut,

je tente la question aussi sur le forum arduino.

Je voudrais piloter un servo avec processing via firmata.
dans la dernière version du protocole, servo a été implémenté mais je trouve pas d'exemple pour piloter correctement un servo via les messages...comme décrit sur la page de firmata.

une idée ?
(google trouve pas grand chose de récent et correcte)

la page firmata

Code:
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 the SET_PIN_MODE message, but the host software implementation could have a different interface, e.g. Arduino's attach() and detach().
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)
 */

comment fait-on un config ?
moi bête stupide smiley-wink

merci d'avance

(et bonne année. smiley-draw c'est fait)
Logged

Pages: [1]   Go Up
Jump to: