[PD] PDuino and servo control
tofuckof at inbox.ru
Thu Sep 18 02:13:29 CEST 2014
Ok. nobody answered, so i do it myself.
so the problem was , that it is nowhere described how to controll continues servo (the 360-servo in which PWM controlls not angle, but speed and direction) with PDUINO.
as no one answered this post i suppose - nobody knows it, or doesn't care ))
Hans-Christoph Steiner (author of PDuino) wrote to me, that he is not working with arduino for a long time.
Here's what i had to find experimentally.
1) need to switch pin to servo-mode in pduino interface
2) after that you can use pduino's servo-slider to experimentally find the proportions in which your servo is controlled, but doing it slowly and gradually.
3) then most probably you will need to send to the [arduino] abstraction the analogue messages like [ analog 7 0.88 ( - in my case i use 7th pin to control the FS5103r speed and direction.. some of the values will mean STOP.. and higher and lower this value will mean forward and backward..
4) and all the changes should be gradual, but not jumping values, because the jumpings are too fast for the comport - that was the reason of it's overloading.
5) this means, that if you will need to change speed - you will need to use [line] object and find the appropriate speed of the ramp experimentally.
6) in case of pduino it also means that you can't do a thing like: going one way with high speed <-> going back with high speed.. because you can't switch speed immidiatly and always need to go through a STOP-value .. don't know if it is common for the comport and all continues servos..
Mon, 15 Sep 2014 06:19:06 +0400 от Фывапр Олджэвич <tofuckof at inbox.ru>:
>Dear List .
>I'm trying to control Servo FS5103r (continuos rotation servo) with PDuino 0.5 via Firmata which was included into Arduino 1.0.4. . I use PureData 42.5.
>I can't understand how to controll this servo.
>When i just send to the digital outpin 0 and 1 every 20 or 10 milliseconds - i can control the direction of the motor (forward and backward), but it is very unstable. Finally it ruins comport with
>[comport]: WriteFile:GetOverlappedResult error: 31
>[comport]: WriteFile:GetOverlappedResult error: 1167
>If i switch the pin to SERVO-mode in PDuino interface - the motor just starts to go in one direction (slowly) .. and i don't know how to turn it to another direction or how to switch it off..
>Is there any tutorial on how to control servos with the PDuino ?
>Pd-list at lists.iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list