Go to Post (The wheels) need to be green anodized, and then assembled with yellow anodized spinners. ... and then, on the spinners, you can etch "JVN is a dweeb". That would be cool. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-03-2013, 22:03
MI6 MI6 is offline
Registered User
FRC #4362
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2011
Location: United States
Posts: 6
MI6 is an unknown quantity at this point
Hi-Tec Servo Help

How would i program a servo to allow me to use a joystick to move it?
Reply With Quote
  #2   Spotlight this post!  
Unread 09-03-2013, 22:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,098
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Hi-Tec Servo Help

Quote:
Originally Posted by MI6 View Post
How would i program a servo to allow me to use a joystick to move it?
Servo.cpp in the WPILib folder.

Reply With Quote
  #3   Spotlight this post!  
Unread 10-03-2013, 11:17
MI6 MI6 is offline
Registered User
FRC #4362
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2011
Location: United States
Posts: 6
MI6 is an unknown quantity at this point
Re: Hi-Tec Servo Help

Quote:
Originally Posted by Ether View Post
Servo.cpp in the WPILib folder.

But which do i use, i want to be able to controller but servo on the camera mount with one joystick
Reply With Quote
  #4   Spotlight this post!  
Unread 10-03-2013, 12:41
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: Hi-Tec Servo Help

Be more detailed about what you want to do, and you'll get more specific advice about how to do it.

What exactly do you want the servo to do, and what exactly do you want to do with the joystick in order for the servo to do it?
Reply With Quote
  #5   Spotlight this post!  
Unread 10-03-2013, 13:38
MI6 MI6 is offline
Registered User
FRC #4362
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2011
Location: United States
Posts: 6
MI6 is an unknown quantity at this point
Re: Hi-Tec Servo Help

Quote:
Originally Posted by Alan Anderson View Post
Be more detailed about what you want to do, and you'll get more specific advice about how to do it.

What exactly do you want the servo to do, and what exactly do you want to do with the joystick in order for the servo to do it?
we are putting our axis camera onto the Pan and Tilt Assembly for camera With the HiTec Servo. I want to controller both servos with the joystick of a PS3 controller, but i want it to be both servos with one of the joystick.

I know that the joystick is the Y
Reply With Quote
  #6   Spotlight this post!  
Unread 10-03-2013, 15:44
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: Hi-Tec Servo Help

Just saying you want to "control servos with a joystick" isn't nearly enough information. Do you want the servo position to match the position of the joystick? For example, would you like to move the joystick to the left and the servo turns to the left, then you return the joystick to the center position and the servo returns to center? Or do you want the servo to move based on the joystick, where it travels further left each time you push the joystick left, and travels further right each time you push the joystick right, and stays where it is when the joystick is in the center position? Or do you want the servo to move constantly as long as the joystick is pressed to the side? Do you want it to move slowly when the joystick is just pressed a little, and quickly when the joystick is pressed a lot?

Try again to say exactly what you want to have happen. Use as much detail as possible. Before you can write a program to do it, you have to be able to describe what you want it to do in clear, unambiguous terms.
Reply With Quote
  #7   Spotlight this post!  
Unread 10-03-2013, 17:52
MI6 MI6 is offline
Registered User
FRC #4362
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2011
Location: United States
Posts: 6
MI6 is an unknown quantity at this point
Re: Hi-Tec Servo Help

Quote:
Originally Posted by Alan Anderson View Post
Just saying you want to "control servos with a joystick" isn't nearly enough information. Do you want the servo position to match the position of the joystick? For example, would you like to move the joystick to the left and the servo turns to the left, then you return the joystick to the center position and the servo returns to center? Or do you want the servo to move based on the joystick, where it travels further left each time you push the joystick left, and travels further right each time you push the joystick right, and stays where it is when the joystick is in the center position? Or do you want the servo to move constantly as long as the joystick is pressed to the side? Do you want it to move slowly when the joystick is just pressed a little, and quickly when the joystick is pressed a lot?

Try again to say exactly what you want to have happen. Use as much detail as possible. Before you can write a program to do it, you have to be able to describe what you want it to do in clear, unambiguous terms.
I want it so when i push left it goes left and when i stop it stays where it is. but i also want to be able to push left and up at the same time and have the camera do it. and i want it to move at the fastest speed without losing video quality
Reply With Quote
  #8   Spotlight this post!  
Unread 11-03-2013, 13:53
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: Hi-Tec Servo Help

Quote:
Originally Posted by MI6 View Post
I want it so when i push left it goes left and when i stop it stays where it is.
So when the joystick X value is negative you want to constantly decrement the servo position, when the joystick X value is positive you want to constantly increment the servo position, and when the joystick X value is zero you want to leave the servo position alone.

Quote:
but i also want to be able to push left and up at the same time and have the camera do it.
Fine. On a second servo: for X above substitute Y.

Quote:
and i want it to move at the fastest speed without losing video quality
You'll have to determine this rate yourself. It'll define how often you need to check the joystick value and increment/decrement the servo position. If it makes sense, you can check less often but move the servo farther each increment.

Does that help?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi