Shop OBEX P1 Docs P2 Docs Learn Events
Using Ping with prop boe bot — Parallax Forums

Using Ping with prop boe bot

mikedivmikediv Posts: 825
edited 2010-01-28 01:14 in Propeller 1
Hi guys I have been experimenting with my prop boe bot I added the ping system but I am using a continues rotation Parallax servo to rotate the ping back and forth. I just realized I only know how to make the servo turn in one direction with spin
can anyone show me the code to make the servo go backward and forward ,, thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-28 00:51
    There is no "the code". Servo control pulses shorter than 1.5ms cause a continuous motion servo to rotate one way and pulses wider than 1.5ms cause rotation the other way. That's all. The details depend on what you're using to generate the pulses.

    BoeBotBasic has statements in it to generate servo pulses for up to 3 servos. The Spin routines are near the end of the main source file (servoProcess near line 1460 and the code for the statements near line 1250).

    Post Edited (Mike Green) : 1/28/2010 12:58:04 AM GMT
  • hover1hover1 Posts: 1,929
    edited 2010-01-28 01:14
    With a continuous motion servo you would have to issue a pulse between 1.5ms and 1.0ms to move one direction, ( 1.45ms would be slower and 1.0ms would be fastest), and then you would have to issue a 1.5ms command to stop. And then go back to somewhere between 1.45 and 2.ms to go in the other direction and issue a 1.5ms again to stop.

    Seems too complicated when you can just use a standard servo with the many examples that already exsist.

    Jim
Sign In or Register to comment.