How to set up a servomotor in MAX/MSP sing Arduino

Roel van Doorn's icon

Hi,

I am working on an interactive installation for which i need a controllable rotation from a servo motor. I already have an Arduino, my servo motor (cheap Modelcraft RS-2) and the firmware on my Arduino is Firmata 2.1. In the Maxuino 007 patch (called arduino_test) there is a servo option, which i think i should use to control the servo motor. I have connected all wires from my servomotor (black to GND, red to 5V and orange to digital 3 PWM). Unfortunately the servo patch does not seem to do anything at this moment, although i am sure i have selected all pins and stuff correctly. Has anyone used a servo motor in combination with the Maxuino 007 patch? If so, any help would be appreciated!

Roel van Doorn's icon

I have already found the stuff out myself: loaded the servo firmata on my Arduino. Then connected servo to pwm pin 9, sent the 'arduino' message (pwm 9 $1) which i connected to a scaled dial. This worked flawlessly!

amirhmt's icon

Hi,
Do you think you could share your code? and also could you explain how to set up a connection between MAX and arduino/processing.
Thanks