View Single Post
  #9   Spotlight this post!  
Unread 17-02-2013, 00:25
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: programmed DC motor in degree..

I'm not getting a clear idea of how you want the servo to act. Here are two possible interpretations of what you said:
  1. The servo begins at 0. Each time you press the joystick trigger, it moves from 0 to 180 and then back to 0, regardless of how long the trigger is held.
  2. While the joystick trigger is not being pressed, the servo is at 0. While the trigger is being pressed, the servo is at 180.

If #1 is what you want, keep in mind that the servo takes some time to move from 0 to 180, so you have to plan for a delay before it returns from 180 to 0. While the programming is straightforward, it involves some things that you will probably find unfamiliar.

If #2 is what you want, the programming is very easy.

Or did you want the servo action to be something else? Remember that computers are not very clever, and you have to be extremely precise in how you describe what you want them to do.