Shop OBEX P1 Docs P2 Docs Learn Events
servo_setramp not working for first move? — Parallax Forums

servo_setramp not working for first move?

GeeksGoneBadGeeksGoneBad Posts: 100
edited 2013-09-19 08:22 in Propeller 1
Hey everybody - got a quick question on controlling a servo

I want the first move of the servo to be slow, but if I try to call servo_setramp as the first thing the servo moves are all very fast - but if I call it after the first move then the second move is slow

anyone know how I can get that first move to be slow?

Here's the code I am using so far - if I move the set_ramp to the first line then both moves are fast:

servo_angle(2, 900);
servo_setramp(2, 20);
servo_angle(2, 0);
pause(1500);
servo_angle(2, 900);
pause(1500);

thanks
Jamie

Comments

  • JonnyMacJonnyMac Posts: 9,107
    edited 2013-09-19 07:49
    What object are you talking about? There is more than one object for servos (including mine, which handles "ramping" like the SSC32).
  • GeeksGoneBadGeeksGoneBad Posts: 100
    edited 2013-09-19 07:58
    Sorry - I am using the included servo stuff with the Simple IDE
  • JonnyMacJonnyMac Posts: 9,107
    edited 2013-09-19 08:22
    I'm sorry, I should have noticed the semicolons (maybe I should make some coffee). My code is in Spin; learning how to port it to C.
Sign In or Register to comment.