Shop OBEX P1 Docs P2 Docs Learn Events
Servo Problem — Parallax Forums

Servo Problem

doverdover Posts: 9
edited 2011-06-27 16:22 in Propeller 1
I have very little experience programming the Propeller and could use some help controlling a Standard Parallax Servo using the the Image Craft C compiler. For those of you who know the BASIC Stamp’s language, I would like something that would allow me to be able to control a servo with as close to the same ease as the PULSOUT command in PBASIC. If someone has some advice or a prewritten driver, C function, etc., that I could add to my project, I would really appreciate it.
Unfortunately, I probably will not be able to respond to any posts for a couple of days.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-15 15:42
    Your duplicate post has been deleted. In the future, please do not post the same question in more than one forum.

    There's no such driver in the Object Exchange. You might ask ImageCraft if someone has written one. You could convert the existing servo driver to a C callable routine, but it's not a beginner's project. Most of what makes the existing servo driver work is written in assembly and can be easily made to work with C. The Spin interface routines (to the assembly language) would have to be rewritten in C.
  • doverdover Posts: 9
    edited 2011-06-20 15:15
    Thanks for the info. I'm not necessarily looking for an official driver, but more like a program that someone has written, that envolved a parallax standard servo. With such a program I was hoping to either copy or convert the code for the servo controller and use it in my project.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-20 17:39
    dover,

    If you are willing to use Spin instead of C, there are lots of objects for controlling a servo.

    If you know how to program in C, Spin shouldn't be very hard to learn.

    Duane
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-06-21 07:02
    There is also a FORTH option for controlling servos, this can be handy when learning how to work with the device. You can do things from a command line interactively, do a lot of experiments and advance your understanding very quickly. Even if your final application is in another language, the interactive play in forth can be a big benefit. Google propforth.
  • doverdover Posts: 9
    edited 2011-06-27 16:22
    Thanks everyone. I think I've got it figured out now.
Sign In or Register to comment.