Servo32 Object Fixed Position

Goal: Make an servo rotate to a fixed position and hold it.

Purpose: This will demonstrate the use of the “servo32″ object by Parallax.

Clock frequency: 5,000 Hz

Propeller code type: This propeller code is based on spin language, and uses the “servo32″ object.

Files to download: (right click)

demo_servo32_fixed

servo32v3

Pics to Download: (click to enlarge)

Note: Only copy and paste from the link above, or formatting issues will occur!

{{
************************************
*        demo_servo32_fixed        *
*       2008                       *
************************************

Goal: Make an servo rotate to a fixed position and hold it.

Purpose: This will demonstrate the use of the "servo32" object by Parallax.
}}

CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000                   'Note Clock Speed for your setup!!

pinServo = 0                           'Servo pin number

VAR

OBJ
SERVO : "Servo32v3"

PUB Servo32_DEMO | temp

SERVO.Start                            'Start Servo handler

repeat
SERVO.Set(pinServo,1500)               'Set servo to desired position
(position muse be between the range of 1000 to 2000)

One Response to Servo32 Object Fixed Position

  1. Pingback: Ejemplo Básico: Usar multiples servomotores con Parallax Propeller | Ecitronik - Electrónica para todos

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>